im trying to make a mod menu with on click javascript , im trying to edit a bookmarklet and change the clickable links to onclick
i hope im asking this question right but here is the bookmarklet im trying to edit i want to change the clickable links to onclick javascript
javascript:!function(){var c=0x1f4,d=0x12c,e='#AAA',f=0x1,g=0x20,h='#444',i='#FFF',j='Bookmarklet\x20Links',k=~~(document['documentElement']['clientWidth']/0x2-c/0x2),l=~~(document['documentElement']['clientHeight']/0x2-d/0x2),m=~~(0.8*g),n=document'createElement';Object'assign';var o=document'createElement';Object'assign';var p=document'createElement';Object'assign',p['textContent']=j;var q=document'createElement',r=~~((g-m)/0x2);Object'assign';var s=document'createElement';Object'assign';var t=document'createElement';t['textContent']='Click\x20the\x20links\x20to\x20open\x20a\x20new\x20tab!',s'appendChild';var u=document'createElement';[{'name':'Google','url':'https://www.google.com'},{'name':'Bing','url':'https://www.bing.com'},{'name':'DuckDuckGO','url':'https://duckduckgo.com'}]['forEach'](c=>{var d=document'createElement',e=document'createElement';e'setAttribute',e'setAttribute',e['textContent']=c['name'],d'appendChild',u'appendChild';}),s'appendChild',q['addEventListener']('click',function c(d){q'removeEventListener';o'removeChild';n'removeChild';n'removeChild';document['body']'removeChild';},!0x1),q['textContent']='×',o'appendChild',o'appendChild',n'appendChild',n'appendChild',document['body']'appendChild',function(c){var d=function(c){var d=c'getBoundingClientRect',e=window['pageXOffset']||document['documentElement']['scrollLeft'],f=window['pageYOffset']||document['documentElement']['scrollTop'];return{'top':d['top']+f,'left':d['left']+e};}(c['parentElement']),e=!0x1,f={'x':0x0,'y':0x0},g={'x':d['left'],'y':d['top']};c['parentElement']'addEventListener',c['parentElement']'addEventListener',document['addEventListener']('mousemove',function(d){if(!e)return;var h={'x':d['clientX']-f['x'],'y':d['clientY']-f['y']},i={'x':g['x']+h['x'],'y':g['y']+h['y']};i['x']<0x0?i['x']=0x0:i['x']+c['parentElement']['offsetWidth']>document['documentElement']['clientWidth']&&(i['x']=document['documentElement']['clientWidth']-c['parentElement']['offsetWidth']);i['y']<0x0?i['y']=0x0:i['y']+c['parentElement']['offsetHeight']>document['documentElement']['clientHeight']&&(i['y']=document['documentElement']['clientHeight']-c['parentElement']['offsetHeight']);c['parentElement']['style']['left']=i['x']+'px',c['parentElement']['style']['top']=i['y']+'px';});}(o);}(window);
Via Active questions tagged javascript - Stack Overflow https://ift.tt/pkISKQO
Comments
Post a Comment