// ==UserScript==// @name Pastebin URL Converter// @namespace http://tampermonkey.net/// @version 1.0// @description Convert Pastebin iframe embed URLs to JS embed format// @match https://www.thecoli.com/threads/*// @grant none// ==/UserScript==(function(){'use strict';// Function to convert Pastebin embed URLfunctionconvertPastebinURL(oldURL){// Extract the paste ID from the old URL formatconstpasteIDMatch=oldURL.match(/\?i=([A-Za-z0-9]+)/);if(pasteIDMatch&&pasteIDMatch[1]){constpasteID=pasteIDMatch[1];return`https://pastebin.com/embed_js/${pasteID}`;}returnoldURL;}// Function to modify iframe sourcesfunctionmodifyIframes(){constiframes=document.querySelectorAll('iframe');iframes.forEach(iframe=>{if(iframe.src.includes('pastebin.com/embed_iframe.php')){constnewSrc=convertPastebinURL(iframe.src);iframe.src=newSrc;}});}// Run the modification when the page loadsmodifyIframes();// Optional: Use a MutationObserver to handle dynamically loaded contentconstobserver=newMutationObserver(modifyIframes);observer.observe(document.body,{childList:true,subtree:true});})();
Warning
LINK
You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue?