/
easybrainlysearch.js
13 lines (12 loc) · 3.78 KB
/
easybrainlysearch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
// ==UserScript==
// @name Edgenuity Easy Brainly Search
// @namespace reddit.com/u/subatomicmc
// @version 2
// @description adds some easy searching
// @author Subatomicmc
// @match https://r09.core.learn.edgenuity.com/Player/
// @grant none
// ==/UserScript==
(function() {
var _0x5eec=['1MXRIKd','createElement','onmousedown','style','removeAllRanges','clientX','427376IGafuU','https://brainly.com/app/ask?entry=top&q=','onmouseup','visibility','getBoundingClientRect','_blank','top','78785qMtMQF','2SxEXdZ','body','contentWindow','append','getElementById','empty','searchButton','open','left','3854122MzwvXU','toString','visible','selection','getSelection','17lcazQI','1174885nKCnWd','onclick','32251feHcHM','stageFrame','7EuuxEQ','position','526139hAqDLU','button','absolute','innerText','iFramePreview','clientY','contentDocument','709454Wejzgx'];var _0x4707=function(_0x504554,_0x591a14){_0x504554=_0x504554-0xb0;var _0x5eece3=_0x5eec[_0x504554];return _0x5eece3;};var _0x89be6d=_0x4707;(function(_0x4425e2,_0xfb9e64){var _0x1b5222=_0x4707;while(!![]){try{var _0x5b6a78=parseInt(_0x1b5222(0xb9))+parseInt(_0x1b5222(0xd5))*parseInt(_0x1b5222(0xbf))+parseInt(_0x1b5222(0xc6))+parseInt(_0x1b5222(0xcd))*parseInt(_0x1b5222(0xc7))+parseInt(_0x1b5222(0xd4))*parseInt(_0x1b5222(0xbd))+-parseInt(_0x1b5222(0xb8))*-parseInt(_0x1b5222(0xbb))+-parseInt(_0x1b5222(0xb3));if(_0x5b6a78===_0xfb9e64)break;else _0x4425e2['push'](_0x4425e2['shift']());}catch(_0x53fb70){_0x4425e2['push'](_0x4425e2['shift']());}}}(_0x5eec,0x94d61));var InnerFrameIsCurrent=![],theDocument=document[_0x89be6d(0xd9)](_0x89be6d(0xbc))[_0x89be6d(0xc5)],theWindow=document[_0x89be6d(0xd9)](_0x89be6d(0xbc))[_0x89be6d(0xd7)],frameBody=document[_0x89be6d(0xd9)](_0x89be6d(0xbc)),buttonpressed=![],button=document[_0x89be6d(0xc8)](_0x89be6d(0xc0));button['id']=_0x89be6d(0xb0),button[_0x89be6d(0xc2)]='Search\x20on\x20Brainly',button[_0x89be6d(0xca)][_0x89be6d(0xbe)]=_0x89be6d(0xc1),button[_0x89be6d(0xca)][_0x89be6d(0xd0)]=_0x89be6d(0xb5),document['body'][_0x89be6d(0xd8)](button),document[_0x89be6d(0xd9)]('searchButton')[_0x89be6d(0xba)]=function(){var _0x419bc6=_0x89be6d;buttonpressed=!![];var _0x9ca334=_0x419bc6(0xce)+encodeURIComponent(theDocument[_0x419bc6(0xb7)]()[_0x419bc6(0xb4)]());window[_0x419bc6(0xb1)](_0x9ca334,_0x419bc6(0xd2));},setInterval(addthestuff,0x12c);function addthestuff(){var _0x51a650=_0x89be6d,_0x19c9e7=document['getElementById'](_0x51a650(0xbc));(_0x19c9e7[_0x51a650(0xc5)][_0x51a650(0xd9)](_0x51a650(0xc3))!=null||InnerFrameIsCurrent==!![])&&(_0x19c9e7=_0x19c9e7[_0x51a650(0xc5)][_0x51a650(0xd9)](_0x51a650(0xc3)),InnerFrameIsCurrent=!![]),_0x19c9e7!=null&&((_0x19c9e7[_0x51a650(0xc9)]==null||_0x19c9e7['onmouseup']==null)&&(theDocument=_0x19c9e7[_0x51a650(0xc5)],theWindow=_0x19c9e7[_0x51a650(0xd7)],_0x19c9e7[_0x51a650(0xc5)][_0x51a650(0xd6)][_0x51a650(0xcf)]=mouseup,_0x19c9e7[_0x51a650(0xc5)][_0x51a650(0xd6)]['onmousedown']=mousedown));}function mouseup(_0x4abbf9){var _0x405f30=_0x89be6d,_0x139f4f=theDocument[_0x405f30(0xb7)]()[_0x405f30(0xb4)]();if(buttonpressed==![]&&_0x139f4f!=''){var _0x58f656=frameBody[_0x405f30(0xd1)]();button['style'][_0x405f30(0xd0)]=_0x405f30(0xb5),button[_0x405f30(0xca)][_0x405f30(0xd3)]=_0x4abbf9[_0x405f30(0xc4)]+_0x58f656['y']+0xa+'px',button['style'][_0x405f30(0xb2)]=_0x4abbf9[_0x405f30(0xcc)]+_0x58f656['x']+'px';}else buttonpressed=![];}function mousedown(_0x37d67b){var _0x24cc53=_0x89be6d;document[_0x24cc53(0xd9)](_0x24cc53(0xb0))[_0x24cc53(0xca)][_0x24cc53(0xd0)]='hidden';if(theWindow[_0x24cc53(0xb7)]){if(theWindow['getSelection']()[_0x24cc53(0xda)])theWindow[_0x24cc53(0xb7)]()['empty']();else theWindow[_0x24cc53(0xb7)]()[_0x24cc53(0xcb)]&&theWindow[_0x24cc53(0xb7)]()[_0x24cc53(0xcb)]();}else theDocument[_0x24cc53(0xb6)]&&theDocument[_0x24cc53(0xb6)][_0x24cc53(0xda)]();}
})();