Last active
November 5, 2025 22:52
-
-
Save altynbek132/03604b2246e530e24949e462c193c36c to your computer and use it in GitHub Desktop.
custom site javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name free medium | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-04-16 | |
| // @description try to take over the world! | |
| // @author You | |
| // @include *://medium.*.com/* | |
| // @include *://*.medium.com/* | |
| // @include *://medium.com/* | |
| // @icon *://www.google.com/s2/favicons?sz=64&domain=medium.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| "use strict"; | |
| // Your code here... | |
| function getUrlPath(url) { | |
| try { | |
| const urlObj = new URL(url); | |
| return urlObj.pathname; // This will return the path part of the URL | |
| } catch (error) { | |
| console.error("Invalid URL:", error); | |
| return null; | |
| } | |
| } | |
| const path = getUrlPath(window.location.href); | |
| const newLoc = window.location | |
| .toString() | |
| .replace("https://", "https://freedium.cfd/"); | |
| window.open(newLoc, "_blank"); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name GitHub Issues Redirect | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-11-07 | |
| // @description Automatically redirect to filtered GitHub Issues | |
| // @author You | |
| // @match https://github.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| console.log(`🚀~github_issue_intitle.js:12~:`); | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| const input = document.querySelector("#js-issues-search"); | |
| // Listen for the 'DOMContentLoaded' event to ensure the script runs after the page is fully loaded | |
| // Get the current URL | |
| const currentUrl = window.location.href; | |
| // Use a regular expression to match the desired URL pattern | |
| const regex = /https:\/\/github\.com\/[^\/]+\/[^\/]+\/issues$/; | |
| // Check if the current URL matches the pattern | |
| if (regex.test(currentUrl)) { | |
| console.log(`🚀~github_issue_intitle.js:62~runner~:`); | |
| // Construct the new URL for redirection | |
| const newUrl = currentUrl + "?q=is%3Aissue+in%3Atitle"; | |
| // Redirect to the new URL | |
| window.location.href = newUrl; | |
| } | |
| } | |
| runner(); | |
| { | |
| // store url on load | |
| let currentPage = location.href; | |
| console.log(`🚀~github_issue_intitle.js:78~:`); | |
| // listen for changes | |
| windows.setInterval(function () { | |
| logger.d(`🚀~github_issue_intitle.js:84~:`); | |
| if (currentPage != location.href) { | |
| // page has changed, set new page as 'current' | |
| console.log(`🚀~github_issue_intitle.js:85~:`); | |
| currentPage = location.href; | |
| runner(); | |
| // do your thing.. | |
| } | |
| }, 1000); | |
| } | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name highlight_links_with_same_origin | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-03-30 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match *://*/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=webbrowsertools.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| // Get the current domain of the site | |
| const currentDomain = window.location.href; | |
| // Select all anchor elements whose href attribute points to the current site | |
| const anchors = [ | |
| ...document.querySelectorAll(`a[href^="${currentDomain}#"]`), | |
| ...document.querySelectorAll(`a[href^="#"]`), | |
| ]; | |
| // Loop through the selected anchors | |
| anchors.forEach((anchor) => { | |
| // set background color with opacity | |
| anchor.style.backgroundColor = "rgba(255, 0, 255, 0.1)"; | |
| }); | |
| } | |
| // Observe the DOM for changes | |
| observeDOM(document.body, debounce(runner, 500)); | |
| runner(); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name olx telephone | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-06-28 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://www.olx.kz/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=olx.kz | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| // Find the link with data-testid="contact-phone" | |
| var contactPhoneLinks = document.querySelectorAll( | |
| 'a[data-testid="contact-phone"]' | |
| ); | |
| for (const contactPhoneLink of contactPhoneLinks) { | |
| console.log( | |
| `🚀~olx_phone.js:56~runner~contactPhoneLink: ${contactPhoneLink}` | |
| ); | |
| // Check if the link exists and has an href attribute | |
| if (contactPhoneLink && contactPhoneLink.hasAttribute("href")) { | |
| // Get the current href value | |
| var hrefValue = contactPhoneLink.getAttribute("href"); | |
| console.log(`🚀~olx_phone.js:62~runner~hrefValue: ${hrefValue}`); | |
| // Replace ":8" with ":+7" in the href value | |
| var newHrefValue = hrefValue.replace(":8", ":+7"); | |
| // Set the new href value back to the link | |
| contactPhoneLink.setAttribute("href", newHrefValue); | |
| console.log( | |
| `🚀~olx_phone.js:69~runner~contactPhoneLink: ${contactPhoneLink}` | |
| ); | |
| } | |
| } | |
| } | |
| // Observe the DOM for changes | |
| observeDOM(document.body, debounce(runner, 500)); | |
| runner(); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Pdf night | |
| // @description . | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-05-14 | |
| // @author [email protected] | |
| // @match *://*/*.pdf | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| document.querySelector("#viewer.pdfViewer").style = "filter: invert(1)"; | |
| } | |
| // Observe the DOM for changes | |
| observeDOM(document.body, debounce(runner, 500)); | |
| runner(); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name number signed integer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-05-14 | |
| // @description number signed integer | |
| // @author [email protected] | |
| // @match https://www.binaryconvert.com/convert_signed_int.html* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=binaryconvert.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| (function () { | |
| // Get all cells in the table | |
| const table = document.querySelector( | |
| "body > table > tbody > tr:nth-child(5) > td > table:nth-child(4) > tbody > tr:nth-child(2) > td > table:nth-child(2) > tbody > tr:nth-child(3) > td > table > tbody > tr" | |
| ); | |
| // Get all image elements in the table | |
| const images = table.querySelectorAll("img"); | |
| // Loop through each image | |
| images.forEach((img, index) => { | |
| // Get the parent td element | |
| const td = img.parentElement; | |
| // Create a div for the number | |
| const numberDiv = document.createElement("div"); | |
| numberDiv.textContent = 32 - index; // Numbers from 31 to 0, right to left | |
| numberDiv.style.cssText = ` | |
| font-size: 10px; | |
| text-align: center; | |
| position: absolute; | |
| width: 18px; | |
| margin-top: -18px; | |
| color: #666; | |
| `; | |
| // Make the parent td relative positioning | |
| td.style.position = "relative"; | |
| // Add the number div to the td | |
| td.appendChild(numberDiv); | |
| // reverse children of td | |
| const children = Array.from(td.children); | |
| children.reverse(); | |
| children.forEach((child) => td.appendChild(child)); | |
| }); | |
| })(); | |
| } | |
| // Observe the DOM for changes | |
| // observeDOM(document.body, debounce(runner, 500)); | |
| runner(); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Tiktok video loop | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-05-14 | |
| // @description Tiktok video loop | |
| // @author [email protected] | |
| // @match https://www.tiktok.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=tiktok.com | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| var observeDOM = (function () { | |
| var MutationObserver = | |
| window.MutationObserver || window.WebKitMutationObserver; | |
| return function (obj, callback) { | |
| if (!obj || obj.nodeType !== 1) return; | |
| if (MutationObserver) { | |
| // define a new observer | |
| var mutationObserver = new MutationObserver(callback); | |
| // have the observer observe for changes in children | |
| mutationObserver.observe(obj, { childList: true, subtree: true }); | |
| return mutationObserver; | |
| } | |
| // browser support fallback | |
| else if (window.addEventListener) { | |
| obj.addEventListener("DOMNodeInserted", callback, false); | |
| obj.addEventListener("DOMNodeRemoved", callback, false); | |
| } | |
| }; | |
| })(); | |
| function debounce(func, delay) { | |
| let timeoutId; | |
| return function () { | |
| const context = this; | |
| const args = arguments; | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout(() => { | |
| func.apply(context, args); | |
| }, delay); | |
| }; | |
| } | |
| function runner() { | |
| document.querySelectorAll(".tiktok-web-player video").forEach((video) => { | |
| if (video.getAttribute("loop") === null) { | |
| video.setAttribute("loop", "true"); | |
| } | |
| }); | |
| } | |
| // Observe the DOM for changes | |
| observeDOM(document.body, debounce(runner, 500)); | |
| runner(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment