Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Replacing .com on .net needs a Userscript (Read 2986 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replacing .com on .net needs a Userscript

If this is not the appropriate forum - please move.

I need Userscript to browser firefox or chrome or opera (unfortunately I do not know how to write) that replaces .com on .net - that http://somesite.com/ on http://somesite.net/

Found one script running on other sites, but this website does not wants - I'm using proxy gateway if it might be the reason.

Code: [Select]
// ==UserScript==
// @include    [url=http://proxiak.eu/*]http://proxiak.eu/*[/url]
// @include    [url=http://somesite.net/*]http://somesite.net/*[/url]
// @include    [url=http://somesite.com/*]http://somesite.com/*[/url]
// @version    1
// ==/UserScript==

var targ = document.links;
for (i = 0; i < targ.length; i++)
{

    if ( targ[i] && targ[i].href && targ[i].href.match( 'https?:\/\/somesite.com') ) {
        targ[i].href = targ[i].href.replace('://somesite.com', '://somesite.net');
    }
}; 

Thank you and best regards.