mirror of
https://github.com/prise6/anywhere
synced 2024-05-11 09:36:33 +02:00
Change code
This commit is contained in:
parent
64175a664d
commit
e73c4d3e02
|
@ -3,7 +3,7 @@
|
||||||
* - naive code -
|
* - naive code -
|
||||||
*/
|
*/
|
||||||
|
|
||||||
javascript:(function(r = "http://swapthatlink.com", c = document.location.href){
|
javascript:(function(r, c){
|
||||||
var l = Array.prototype.slice.call(document.getElementsByTagName('a')),
|
var l = Array.prototype.slice.call(document.getElementsByTagName('a')),
|
||||||
e = new RegExp("^(javascript|mailto|(https?)?" + c + "/?#)"),
|
e = new RegExp("^(javascript|mailto|(https?)?" + c + "/?#)"),
|
||||||
f = false;
|
f = false;
|
||||||
|
@ -17,4 +17,4 @@ javascript:(function(r = "http://swapthatlink.com", c = document.location.href){
|
||||||
}
|
}
|
||||||
document.location.href = r;
|
document.location.href = r;
|
||||||
return;
|
return;
|
||||||
})();
|
})("http://swapthatlink.com", document.location.href);
|
2
Js/anywhere.min.js
vendored
2
Js/anywhere.min.js
vendored
|
@ -1 +1 @@
|
||||||
javascript:(function(r="http://swapthatlink.com",c=document.location.href){var l=Array.prototype.slice.call(document.getElementsByTagName('a')),e=new RegExp("^(mailto|(https?)?"+c+"/?#)"),f=false;while(!f&l.length>0){i=Math.floor(Math.random()*l.length);if(e.test(l[i].href)||l[i].href==c)l.splice(i,1);else{r=l[i].href;f=true}}document.location.href=r;return})();
|
javascript:(function(t,e){for(var a=Array.prototype.slice.call(document.getElementsByTagName("a")),o=new RegExp("^(javascript|mailto|(https?)?"+e+"/?#)"),n=!1;!n&a.length>0;)i=Math.floor(Math.random()*a.length),o.test(a[i].href)||a[i].href==e?a.splice(i,1):(t=a[i].href,n=!0);document.location.href=t})("http://swapthatlink.com",document.location.href);
|
Loading…
Reference in a new issue