Skip to main content
Topic: Replacing .com on .net needs a Userscript (Read 2043 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.

 
SimplePortal 1.0.0 RC1 © 2008-2019