adding to gitea repo

This commit is contained in:
Lucca Pirovano
2026-06-15 14:20:38 -04:00
commit cd7a2bd773
21 changed files with 1994 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
// ==UserScript==
// @name Rename Tab Alt+F2
// @match *://*/*
// @run-at document-start
// ==/UserScript==
addEventListener('keydown', e=>{
if (e.altKey && e.key==='F2') {
e.preventDefault();
let t = prompt('New title:', document.title);
document.title = t?.trim() || document.title;
}
}, true);
@@ -0,0 +1,49 @@
// ==UserScript==
// @name Force Enable Right Click, Copy & Paste
// @version 3.0
// @description Re-enables right click, text selection, and copying/pasting on all sites
// @author You
// @match https://www.netacad.com/*
// @match https://*ucertify.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// Re-enable text selection and right-click
const styles = `* { user-select: auto !important; -webkit-user-select: auto !important; pointer-events: auto !important; }`;
const styleSheet = document.createElement('style');
styleSheet.textContent = styles;
document.head.appendChild(styleSheet);
// Prevent right-click blocking
document.addEventListener('contextmenu', e => e.stopPropagation(), true);
// Prevent text selection blocking
document.addEventListener('selectstart', e => e.stopPropagation(), true);
// Prevent dragstart blocking
document.addEventListener('dragstart', e => e.stopPropagation(), true);
// Stop blocking copy and cut events
document.addEventListener('copy', e => e.stopPropagation(), true);
document.addEventListener('cut', e => e.stopPropagation(), true);
// Prevent scripts from blocking pasting
document.addEventListener('paste', e => e.stopPropagation(), true);
// Optional: Override any inline scripts that may be preventing user actions
const scriptOverride = setInterval(() => {
const blockers = document.querySelectorAll('script');
blockers.forEach(script => {
if (script.innerHTML.includes('event.preventDefault()') || script.innerHTML.includes('return false;')) {
script.innerHTML = script.innerHTML.replace(/event.preventDefault\(\)/g, '').replace(/return false;/g, '');
}
});
}, 1000);
// Stop the interval once all blockers are cleared
setTimeout(() => clearInterval(scriptOverride), 5000);
})();
@@ -0,0 +1,110 @@
// ==UserScript==
// @name Click "Submit" arrow button on F12
// @namespace vm-click-submit-arrow
// @match https://*netacad.com/*
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1
// @grant none
// @version 1.5
// @run-at document-end
// ==/UserScript==
(function () {
'use strict';
function findSubmitButton() {
// Primary search: light DOM + exact attributes & content
let btns = document.querySelectorAll('button[aria-label="submit"].submit-button');
for (const btn of btns) {
const innerDiv = btn.querySelector('div.submit');
if (innerDiv && innerDiv.textContent.trim() === 'Submit') {
console.log('[SubmitClick] Exact match found in light DOM');
return btn;
}
}
// Deep shadow DOM recursive search
function searchShadows(root) {
const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);
let node;
while ((node = walker.nextNode())) {
if (node.shadowRoot) {
const shadowBtns = node.shadowRoot.querySelectorAll('button[aria-label="submit"].submit-button');
for (const btn of shadowBtns) {
const innerDiv = btn.querySelector('div.submit');
if (innerDiv && innerDiv.textContent.trim() === 'Submit') {
console.log('[SubmitClick] Found in shadow root of:', node.tagName.toLowerCase());
return btn;
}
}
// Recurse deeper
const found = searchShadows(node.shadowRoot);
if (found) return found;
}
}
return null;
}
const shadowResult = searchShadows(document.body);
if (shadowResult) return shadowResult;
console.log('[SubmitClick] No Submit button detected yet (aria-label + div.submit + text "Submit")');
return null;
}
function triggerClick() {
const btn = findSubmitButton();
if (!btn) {
console.log('[SubmitClick] → Submit button not found yet');
return false;
}
console.log('[SubmitClick] → Found Submit button, clicking it');
// Synthetic click event
try {
const clickEvent = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window,
detail: 1
});
btn.dispatchEvent(clickEvent);
} catch (err) {
console.warn('[SubmitClick] dispatchEvent failed', err);
}
// Direct .click() fallback
if (typeof btn.click === 'function') {
try {
btn.click();
} catch (err) {
console.warn('[SubmitClick] .click() failed', err);
}
}
return true;
}
VM.shortcut.register('f12', () => {
setTimeout(() => {
if (!triggerClick()) {
// Extra retry for slow-rendering elements
setTimeout(triggerClick, 400);
}
}, 60);
});
console.log('[SubmitClick] Loaded press F12 to click the Submit button');
// Optional: uncomment for auto-click every ~1.5 seconds until success
/*
const autoInterval = setInterval(() => {
if (triggerClick()) {
clearInterval(autoInterval);
console.log('[SubmitClick] Auto-click successful stopping checks');
}
}, 1500);
*/
})();
@@ -0,0 +1,16 @@
// ==UserScript==
// @name Ucertify Tests F12 to Next Question
// @namespace Violentmonkey Scripts
// @match https://*ucertify.com/*
// @grant none
// @version 1.0
// @author -
// @description 2/4/2026, 2:39:45 PM
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1
// ==/UserScript==
function clickNexT(){
next.click()
}
VM.shortcut.register('F12', () =>
clickNexT()
);
+31
View File
@@ -0,0 +1,31 @@
// ==UserScript==
// @name Fast Timesheets
// @namespace Violentmonkey Scripts
// @grant none
// @version 1.0
// @author -
// @match https://wd5.myworkday.com/*
// @description 2/3/2026, 1:18:01 PM
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1
// ==/UserScript==
function clickThing(){
document.querySelector("[data-automation-id='promptIcon']").click();
//document.querySelector("[data-automation-id='promptSearchButton']").click();
}
function clickThing2(){
document.querySelector("[data-automation-label='Regular Hours Worked']").click();
}
function clickThing3(){
document.querySelectorAll("[data-automation-id='wd-CommandButton']")[4].click()
}
VM.shortcut.register('F1', () =>
clickThing()
);
VM.shortcut.register('F2', () =>
clickThing2()
);
VM.shortcut.register('F3', () =>
clickThing3()
);