Site block issue on SLT customers.

Status
Not open for further replies.

RupiyalWissa

Member
Jun 30, 2012
21
2
0
Fix Elakiri Block - Auto Redirect to elakiri.lk

1. Install Greasemonkey addon for firefox

You will get an addon icon with a monkey's face after installing

2. Click the down arrow to the right of the monkey's face and click "new user script"

3. Add any name you want. Set the namespace to www.elakiri.com Keep other fields blank

4. I think you are asked to choose your text editor on the first run. Can't remember. Just select notepad (should be in C:\Windows\system32).

5. Add the following code below the line containing // ==/UserScript==

if(window.location.host=="www.elakiri.com"){
var currentURL = window.location.href;
//alert("currentURL=" + currentURL);

var URLParts = currentURL.split('/');
//alert("PartsURL[2]=" + URLParts[2]);

URLParts[2] = "www.elakiri.lk";
var newURL = URLParts.join('/');
//alert("newURL=" + newURL);

window.location = newURL;
}

6. Browse ElaKiri.com as usual. Pages with elakiri.com in them will be redirected to elakiri.lk automatically.


You can do the same thing with Tampermonkey for Chrome.



 
  • Like
Reactions: king_pandukabaya

king_pandukabaya

Well-known member
  • Apr 20, 2010
    13,465
    891
    113
    Colombo
    1. Install Greasemonkey addon for firefox

    You will get an addon icon with a monkey's face after installing

    2. Click the down arrow to the right of the monkey's face and click "new user script"

    3. Add any name you want. Set the namespace to www.elakiri.com Keep other fields blank

    4. I think you are asked to choose your text editor on the first run. Can't remember. Just select notepad (should be in C:\Windows\system32).

    5. Add the following code below the line containing // ==/UserScript==

    if(window.location.host=="www.elakiri.com"){
    var currentURL = window.location.href;
    //alert("currentURL=" + currentURL);

    var URLParts = currentURL.split('/');
    //alert("PartsURL[2]=" + URLParts[2]);

    URLParts[2] = "www.elakiri.lk";
    var newURL = URLParts.join('/');
    //alert("newURL=" + newURL);

    window.location = newURL;
    }

    6. Browse ElaKiri.com as usual. Pages with elakiri.com in them will be redirected to elakiri.lk automatically.


    You can do the same thing with Tampermonkey for Chrome.



    11.gif
    11.gif
    11.gif
    11.gif
     
    Status
    Not open for further replies.