-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshortlink-body.min.js
1 lines (1 loc) · 2.31 KB
/
shortlink-body.min.js
1
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",encode:function(e){var r,t,o,a,n,h,c,f="",d=0;for(e=Base64._utf8_encode(e);d<e.length;)r=e.charCodeAt(d++),t=e.charCodeAt(d++),o=e.charCodeAt(d++),a=r>>2,n=(3&r)<<4|t>>4,h=(15&t)<<2|o>>6,c=63&o,isNaN(t)?h=c=64:isNaN(o)&&(c=64),f=f+this._keyStr.charAt(a)+this._keyStr.charAt(n)+this._keyStr.charAt(h)+this._keyStr.charAt(c);return f},decode:function(e){var r,t,o,a,n,h,c,f="",d=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<e.length;)a=this._keyStr.indexOf(e.charAt(d++)),n=this._keyStr.indexOf(e.charAt(d++)),h=this._keyStr.indexOf(e.charAt(d++)),c=this._keyStr.indexOf(e.charAt(d++)),r=a<<2|n>>4,t=(15&n)<<4|h>>2,o=(3&h)<<6|c,f+=String.fromCharCode(r),64!=h&&(f+=String.fromCharCode(t)),64!=c&&(f+=String.fromCharCode(o));return Base64._utf8_decode(f)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var r="",t=0;t<e.length;t++){var o=e.charCodeAt(t);o<128?r+=String.fromCharCode(o):o>127&&o<2048?(r+=String.fromCharCode(o>>6|192),r+=String.fromCharCode(63&o|128)):(r+=String.fromCharCode(o>>12|224),r+=String.fromCharCode(o>>6&63|128),r+=String.fromCharCode(63&o|128))}return r},_utf8_decode:function(e){for(var r="",t=0,o=c1=c2=0;t<e.length;)(o=e.charCodeAt(t))<128?(r+=String.fromCharCode(o),t++):o>191&&o<224?(r+=String.fromCharCode((31&o)<<6|63&(c2=e.charCodeAt(t+1))),t+=2):(r+=String.fromCharCode((15&o)<<12|(63&(c2=e.charCodeAt(t+1)))<<6|63&(c3=e.charCodeAt(t+2))),t+=3);return r}},protected_links="",a_to_va=0,a_to_vb=0,a_to_vc="";function auto_safelink(){auto_safeconvert()}function auto_safeconvert(){var e=window.location.hostname;""==protected_links||protected_links.match(e)?""==protected_links&&(protected_links=e):protected_links+=", "+e;var r="",t=[],o=0;a_to_va=(r=document.getElementsByTagName("a")).length,o=(t=a_to_fa()).length;for(var a=!1,n=0,h=["https://ja-techs.blogspot.com/p/getting-your-file-ready.html"],c=h[Math.floor(Math.random()*h.length)],f="",d=0;d<a_to_va;d++){for(a=!1,n=0;!1==a&&n<o;)!(f=r[d].href).match(t[n])&&f&&f.match("https")||(a=!0),n++;if(!1==a){var i=Base64.encode(f);r[d].href=c+"?url="+i,r[d].rel="noopener noreferrer",a_to_vb++,a_to_vc+=d+":::"+r[d].href+"\n"}}var C="",s="";C&&(C.innerHTML+=a_to_vb),s&&(s.innerHTML+=a_to_va)}function a_to_fa(){var e=[];return(protected_links=protected_links.replace(" ","")).split(",")}