Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-------------------Time------------
- let date= new Date(),
- hh= date.getHours(),
- mm= date.getMinutes();
- let ampm= (hh>=12) ? "PM" : "AM";
- if (hh>12) hh= hh-12;
- if (mm<10) mm= 0+''+mm;
- let time= `${hh}:${mm} ${ampm}`;
- //-----------------------------Unmask Password----------------
- let input= document.querySelectorAll("input[type='password']");
- input.forEach(i=> i.type= "text")
- //-------------------Limit Google Search To documents only---------------------
- let url= "https://google.com/search?q=",
- query= document.querySelector("[name='q']").value,
- ext= " (ext:pdf OR ext:doc OR ext:docx OR ext:ppt OR ext:pptx OR ext:xls OR ext:xlsx)";
- location= url + query + ext;
- //-----------------------Urban Dictionary (Remove '?' from URL)-----------------------------
- let a= window.location.href;
- let b= a.split('?term=');
- let c= b[0];
- let d= b[1];
- if (d.includes('?')) {
- d= d.replace('?','');
- location.replace(c+'?term='+d);
- }
- //------------------------Blogger (Reload web/desktop version)------------------
- let a= window.location.href;
- let b= a.split('?m=');
- let c= b[0];
- let d= b[1];
- if (d==='1') {
- d=0;
- location.replace(c+'?m='+d);
- }
- //----------
- let a= window.location.href;
- let b= a.split('?m=');
- let c= b[0];
- let d= b[1];
- if (d.includes('1')) {
- d=d.replace('1','0');
- location.replace(c+'?m='+d);
- }
- //--------
- let a= window.location.href;
- let b= a.split('?m=');
- let c= b[1];
- if (c==1) {
- window.location= a.replace('?m=1', '?m=0');
- };
- //------------Date & Time (Display in HTML)-------------------------
- let a= new Date(),
- b= a.getFullYear(),
- c= a.getMonth()+1,
- d= a.getDate(),
- e= a.getHours(),
- f= a.getMinutes();
- if (c<10) c= 0+''+c;
- if (d<10) d= 0+''+d;
- if (f<10) f= 0+''+f;
- if (e===12) e= '12'+':'+f+' PM';
- if (e===24 || e===0) e= '12'+':'+f+' AM';
- if (e<12) e= e+':'+f+' AM';
- if (e>12) e= (e-12)+':'+f+' PM';
- if (c==01) c= 'Jan.';
- if (c==02) c= 'Feb.';
- if (c==03) c= 'Mar.';
- if (c==04) c= 'Apr.';
- if (c==05) c= 'May';
- if (c==06) c= 'Jun.';
- if (c==07) c= 'Jul.';
- if (c==08) c= 'Aug.';
- if (c==09) c= 'Sep.';
- if (c==10) c= 'Oct.';
- if (c==11) c= 'Nov.';
- if (c==12) c= 'Dec.';
- g= d+' '+c+' '+b;
- h= e;
- document.write(g+' ['+h+']');
- //----Time
- function time(x="hm"){
- let a= new Date().toLocaleTimeString('en-US');
- let b= a.split(":");
- let h= b[0], m= b[1], s= b[2];
- if(x=="hm") return (h+":"+m+ s.match(/\D+/g));
- if(x=="hms") return (h+":"+m+":"+s);
- };
- element.innerHTML= time;
- //--------------Google Search Date Range (Custom Input)-----------------------
- let url = window.location.href,
- a = new Date();
- b = a.getFullYear(),
- c = (a.getMonth() + 1),
- d = a.getDate(),
- e = c + '/' + d + '/' + b,
- sd = window.prompt('Start date (MM/DD/YYYY)', e),
- ed = window.prompt('End date (MM/DD/YYYY)', e);
- location = url + '&tbs=cdr:1,cd_min:' + sd + ',cd_max:' + ed;
- //minified:
- javascript:void%20function(){javascript:(function(){let%20f=window.location.href,g=new%20Date;b=g.getFullYear(),c=g.getMonth()+1,d=g.getDate(),e=c+%22/%22+d+%22/%22+b,sd=window.prompt(%22Start%20date%20(MM/DD/YYYY)%22,e),ed=window.prompt(%22End%20date%20(MM/DD/YYYY)%22,e),location=f+%22%26tbs=cdr:1,cd_min:%22+sd+%22,cd_max:%22+ed})()}();
- //--------------
- let a= location.hostname+'/search?q=';
- if (!a.includes('www.google')) alert ('Not on Google');
- else {
- b= document.forms[0].elements['q'].value,
- c= new Date(),
- d= c.getFullYear(),
- e= c.getMonth()+1,
- f= c.getDate(),
- g= e+'/'+f+'/'+d,
- h= prompt('Enter start date (Month/Day/Year)','01/01/2000'),
- i= prompt('Enter end date (Month/Day/Year)',g),
- j= '&tbs=cdr:1,cd_min:'+h+',cd_max:'+i,
- k= location.protocol+'//';
- location= k+a+b+j;
- }
- //------------------Welk lidwoord-------------------------
- location.href='https://www.welklidwoord.be/'+getSelection().toString()
- //Custom Input
- let a= 'https://www.welklidwoord.be/';
- let b= window.prompt('Typ een woord in!','');
- let c= 'Niets getypt of geannuleerd !';
- if (b==null) alert(c);
- else
- window.open(a+b);
- //Selection as Input
- let a= 'https://www.welklidwoord.be/';
- let b= getSelection().toString();
- let c= 'Je hebt niets geselecteerd!';
- let d= 'Selecteer slechts ÉÉN woord!';
- if (b=='') alert (c);
- else if (b.includes(' ')) alert (d);
- else
- window.open(a+b);
- //------------------Load Tumbex version of Tumblr--------------------------
- var a = window.location.host,
- b = a.split('.'), c= b[0], d= b[1],e = b[2];
- window.open('https://tumbex.com/' + c + '.' + d)
- //------
- let a = window.location.host,
- b = a.split('.'),
- c = b[0],
- d = b[1],
- e = b[2];
- window.open('https://tumbex.com/' + c + '.' + d)
- //----------
- let a= 'https://www.tumbex.com/',
- b= location.host,
- c= b.replace('.com','');
- location.replace(a+c);
- //----------
- let a= location.href;
- a= decodeURIComponent(a);
- b= location.protocol;
- c= location.hostname;
- d= a.replace(b,'');
- d= d.replace('.com','');
- e= 'https://tumbex.com/';
- if (a.includes('safe-mode?url=')) {
- a= a.split('?url=')[1];
- a= a.split('/')[2];
- a= a.replace ('.com','');
- location= e+a;
- }
- else if (c != 'www.tumblr.com') location= e+d;
- //------------------CHECK YOUTUBE GEO RESTRICTION--------------------------
- var url = window.location.href
- var getpart = url.split('=');
- var vidid = getpart[1];
- location = 'https://watannetwork.com/tools/blocked/#url='+ vidid;
- //---------Playstore APK search on Google------------------------
- let a= location.href;
- if (a.includes('store/apps/details?')){
- let b= a.match(/\?id=.+?&/).toString(),
- c= b.replace(/\?id=|&/g,''),
- d= 'https://google.com/search?q=',
- e= ' apk';
- window.open(d+c+e);}
- else alert ('Not on an app page on PlayStore');
- //---------------GOOGLE SEARCH CURRENT SITE-------------------------
- let a= location.hostname;
- b= a.split('.');
- c= 'https://google.com/search?q=site:';
- d= prompt('Enter search term to Google');
- if (b[0]=='m' || b[0]=='mobile') {
- let e= b[1]+'.'+b[2]; //or e=b.slice(1).join('.');
- f= c+e+' '+d;
- window.open(f);
- }
- else {
- let g= c+a+' '+d;
- window.open(g);
- }
- //------LINKIFY-------
- let a= document.querySelectorAll("a");
- let regex= /(https?\:\/\/|javascript\:).+/;
- let b= [...a].map(i=>i.innerHTML);
- if(!sessionStorage.urltext) sessionStorage.urltext= JSON.stringify(b);
- a.forEach((i,x)=>{
- if(!regex.test(i.text)){
- i.text= i.href;
- }
- else{
- let c= JSON.parse(sessionStorage.urltext);
- i.innerHTML= c[x];
- }
- });
- let obu = false;
- window.onunload = window.onbeforeunload= function(){
- if(!obu){
- obu= true;
- sessionStorage.removeItem("urltext");
- }};
Advertisement
Add Comment
Please, Sign In to add comment