Skip to content

Instantly share code, notes, and snippets.

@SyFizz
Created April 10, 2021 09:32
Show Gist options
  • Save SyFizz/24792431c217ba79f8bc38e091db7d0e to your computer and use it in GitHub Desktop.
Save SyFizz/24792431c217ba79f8bc38e091db7d0e to your computer and use it in GitHub Desktop.
Replace URL for psbdmp
// ==UserScript==
// @name URLReplacer
// @namespace Example
// @description Replaces URL from psbdmp to go to pastebin.
// @include https://psbdmp.ws/dump/*
// ==/UserScript==
var links = document.getElementsByTagName("a"); //array
var regex = /^(http:\/\/)([^\.]+)(\.example\.to\/images\/thumb/\)(.+)$/i;
for (var i=0,imax=links.length; i<imax; i++) {
links[i].href = links[i].href.replace("https://psbdmp.ws/dump/","https://pastebin.com/");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment