-
Notifications
You must be signed in to change notification settings - Fork 0
/
gifview.html
22 lines (22 loc) · 13.4 KB
/
gifview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="Gif Viewer" content="Gif" />
<title>Gif Viewer 1.0.0</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap" rel="stylesheet" />
<script src="https://streamdoctors.com/tmi.min.js"></script>
<style>*{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}body{font-family:Roboto,sans-serif}.zoomer-img.portrait{width:40%;height:100%;margin:0 auto;background-attachment:scroll}.zoomer-img.nearest-neighbor{image-rendering:optimizeSpeed;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-optimize-contrast;-ms-interpolation-mode:nearest-neighbor}.zoomer-img{position:absolute;left:0;right:0;top:0;bottom:0;background:no-repeat center center;background-size:cover;-webkit-transition:background-image .2s ease-in-out;-o-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out;z-index:-1}.zoomer-img.right{opacity:0;left:50%;-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.zoomer-img.right[data-mode=split]{opacity:1}.zoomer-img.left[data-mode=split]{right:50%}#username{position:absolute;right:0;bottom:0;font-size:2rem;color:#fff;margin:1rem 1.5rem;opacity:0;-webkit-transition:opacity .6s ease-in-out;-o-transition:opacity .6s ease-in-out;transition:opacity .6s ease-in-out}</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="gif_left" class="zoomer-img left"></div>
<div id="gif_right" class="zoomer-img right"></div>
<div id="username"></div>
<script>const _0x14ad=['startsWith','\x20only\x20gifs\x20from\x20giphy.com\x20are\x20allowed!','parse','clearcookies','warn','gif_right','info','\x20can\x20post\x20a\x20gif','https://media.giphy.com/media/pTIaVha38QDA8EdSCJ/giphy.gif','mod','stringify','identity','style','say','prototype','channel','321903etoaOX','fullscreen','toLowerCase','slice','duration','addEventListener',';path=/','1592802fwFvzY','1dwNcQF','oauth:','message','820564jEHJxB','gif','get','twitch','shift','botusername','seconds','everyone','/giphy.gif','indexOf','replace','\x20is\x20unbanned!','forEach','73RRclmW','substring','skip','connect','mods','{}.constructor(\x22return\x20this\x22)(\x20)','url(','dataset','src','location','\x20make\x20sure\x20to\x20add\x20valid\x20group:\x20!gif\x20allow\x20(everyone|subs|mods)','opacity','Client','backgroundImage','length','setTimeout','923615rEMymK','load','30902MJRRnD','mode','display-name','trace','\x20is\x20now\x20banned\x20from\x20posting\x20gifs!','push','gif_mode=','unban','split','includes','error','innerHTML','cookie','Channel\x20parameter\x20is\x20missing\x20in\x20URL\x20(channel=xxxx)\x0a\x0aPlease\x20enter\x20the\x20Twitch\x20channel:','ban','gif_left','2GTahLN','match','\x20make\x20sure\x20to\x20add\x20the\x20username','\x20is\x20not\x20banned!','subscriber','3747RQEgTh','table','debug','console','charAt','toUTCString','bind','filter','toString','Missing\x20oauth\x20parameters\x20in\x20URL\x20(botusername=xxxx&oauth=xxxx)\x0a\x0aBot\x20will\x20not\x20respond\x20in\x20chat!','getElementById','13fKpPwj','allow','missing_oauth_message_shown','ban_list=','log','535849LtGQeb','username'];const _0xff3eac=_0x2030;function _0x2030(_0x925c1f,_0x345c1d){return _0x2030=function(_0x275e07,_0xc75c5e){_0x275e07=_0x275e07-0x1c2;let _0x53e2c8=_0x14ad[_0x275e07];return _0x53e2c8;},_0x2030(_0x925c1f,_0x345c1d);}(function(_0x464e65,_0x14d72f){const _0x547c2f=_0x2030;while(!![]){try{const _0x2017bf=-parseInt(_0x547c2f(0x1c8))*-parseInt(_0x547c2f(0x1d0))+parseInt(_0x547c2f(0x1f2))*parseInt(_0x547c2f(0x212))+-parseInt(_0x547c2f(0x1e0))*parseInt(_0x547c2f(0x207))+-parseInt(_0x547c2f(0x202))*parseInt(_0x547c2f(0x217))+parseInt(_0x547c2f(0x1cf))+parseInt(_0x547c2f(0x1d3))+-parseInt(_0x547c2f(0x1f0));if(_0x2017bf===_0x14d72f)break;else _0x464e65['push'](_0x464e65['shift']());}catch(_0x305efc){_0x464e65['push'](_0x464e65['shift']());}}}(_0x14ad,0xd3f37));const _0x53e2c8=function(){let _0x21188d=!![];return function(_0x3946df,_0xc8bf4b){const _0x3326eb=_0x21188d?function(){if(_0xc8bf4b){const _0x362d39=_0xc8bf4b['apply'](_0x3946df,arguments);return _0xc8bf4b=null,_0x362d39;}}:function(){};return _0x21188d=![],_0x3326eb;};}(),_0xc75c5e=_0x53e2c8(this,function(){const _0x386834=_0x2030;let _0x85301f;try{const _0x5a7341=Function('return\x20(function()\x20'+_0x386834(0x1e5)+');');_0x85301f=_0x5a7341();}catch(_0x2e123b){_0x85301f=window;}const _0x38a491=_0x85301f[_0x386834(0x20a)]=_0x85301f[_0x386834(0x20a)]||{},_0x34e35e=[_0x386834(0x216),_0x386834(0x21d),_0x386834(0x21f),_0x386834(0x1fc),'exception',_0x386834(0x208),_0x386834(0x1f5)];for(let _0x5ebcac=0x0;_0x5ebcac<_0x34e35e['length'];_0x5ebcac++){const _0x25355b=_0x53e2c8['constructor'][_0x386834(0x1c6)][_0x386834(0x20d)](_0x53e2c8),_0x3c6be6=_0x34e35e[_0x5ebcac],_0x5a68f5=_0x38a491[_0x3c6be6]||_0x25355b;_0x25355b['__proto__']=_0x53e2c8[_0x386834(0x20d)](_0x53e2c8),_0x25355b[_0x386834(0x20f)]=_0x5a68f5[_0x386834(0x20f)][_0x386834(0x20d)](_0x5a68f5),_0x38a491[_0x3c6be6]=_0x25355b;}});_0xc75c5e();const {tmi}=window,urlParams=new URLSearchParams(window[_0xff3eac(0x1e9)]['search']);urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x21c))!==null&&confirm('Are\x20you\x20sure\x20to\x20delete\x20cookies\x20from\x20Gif\x20Shower\x20and\x20so\x20all\x20its\x20data?')&&document[_0xff3eac(0x1fe)][_0xff3eac(0x1fa)](';')[_0xff3eac(0x1df)](_0x3673ea=>{const _0x2a0f26=_0xff3eac;document[_0x2a0f26(0x1fe)]=_0x3673ea['replace'](/^ +/,'')[_0x2a0f26(0x1dd)](/=.*/,'=;expires='+new Date()[_0x2a0f26(0x20c)]()+_0x2a0f26(0x1ce));});const readCookie=_0x4f1c55=>{const _0x2108b9=_0xff3eac,_0x4b2fe3=_0x4f1c55+'=',_0x3d3456=document[_0x2108b9(0x1fe)][_0x2108b9(0x1fa)](';');for(let _0x519847=0x0;_0x519847<_0x3d3456['length'];_0x519847+=0x1){let _0x30ab2e=_0x3d3456[_0x519847];while(_0x30ab2e[_0x2108b9(0x20b)](0x0)==='\x20')_0x30ab2e=_0x30ab2e[_0x2108b9(0x1e1)](0x1,_0x30ab2e['length']);if(_0x30ab2e[_0x2108b9(0x1dc)](_0x4b2fe3)===0x0)return _0x30ab2e[_0x2108b9(0x1e1)](_0x4b2fe3[_0x2108b9(0x1ee)],_0x30ab2e['length']);}return null;},username=urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x1d8)),oauth=urlParams[_0xff3eac(0x1d5)]('oauth'),channel=(urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x1c7))||readCookie('twitch_channel')||prompt(_0xff3eac(0x1ff),_0xff3eac(0x1d6))||_0xff3eac(0x1d6))[_0xff3eac(0x1ca)](),skipGifParam=urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x1e2))||'',skipGif=skipGifParam['match'](/https?:\/\/media\.giphy\.com\/media\/([A-z0-9]+)\/giphy\.gif/)||skipGifParam['match'](/https?:\/\/giphy\.com\/embed\/([A-z0-9]+)/)?skipGifParam:_0xff3eac(0x221);if(channel!==_0xff3eac(0x1d6))document[_0xff3eac(0x1fe)]='twitch_channel='+channel;const tmiOptions={'options':{'debug':urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x209))!==null},'identity':{'username':username,'password':_0xff3eac(0x1d1)+oauth},'channels':[channel]};(!username||!oauth)&&(readCookie(_0xff3eac(0x214))!=='true'&&(alert(_0xff3eac(0x210)),document[_0xff3eac(0x1fe)]='missing_oauth_message_shown=true'),delete tmiOptions[_0xff3eac(0x1c3)]);const client=new tmi[(_0xff3eac(0x1ec))](tmiOptions);let banList=JSON[_0xff3eac(0x21b)](readCookie('ban_list')||'[]'),currentMode=readCookie('gif_mode')||_0xff3eac(0x1da),gifTimeout=![],gifDuration=isNaN(urlParams[_0xff3eac(0x1d5)](_0xff3eac(0x1cc)))?0x6:Number(urlParams[_0xff3eac(0x1d5)]('duration'));const sendTmiMessage=({message:_0x430825})=>{const _0x3f6a23=_0xff3eac;if(!tmiOptions[_0x3f6a23(0x1c3)][_0x3f6a23(0x218)])return;client[_0x3f6a23(0x1c5)](channel,_0x430825);},addToBanList=({banUser:_0x591ae8,tusername:_0x2dd8ae})=>{const _0x1dd2b3=_0xff3eac;if(banList[_0x1dd2b3(0x1fb)](_0x591ae8))return sendTmiMessage({'message':'@'+_0x2dd8ae+':\x20'+_0x591ae8+'\x20is\x20already\x20banned!'});return banList[_0x1dd2b3(0x1f7)](_0x591ae8),document[_0x1dd2b3(0x1fe)]=_0x1dd2b3(0x215)+JSON[_0x1dd2b3(0x1c2)](banList),sendTmiMessage({'message':'@'+username+':\x20'+_0x591ae8+_0x1dd2b3(0x1f6)});},removeFromBanList=({banUser:_0x4d1fe5,tusername:_0x47945e})=>{const _0x4960cb=_0xff3eac;if(!banList[_0x4960cb(0x1fb)](_0x4d1fe5))return sendTmiMessage({'message':'@'+_0x47945e+':\x20'+_0x4d1fe5+_0x4960cb(0x205)});return banList=banList[_0x4960cb(0x20e)](_0x1cd915=>_0x1cd915!==_0x4d1fe5),document[_0x4960cb(0x1fe)]=_0x4960cb(0x215)+JSON[_0x4960cb(0x1c2)](banList),sendTmiMessage({'message':'@'+username+':\x20'+_0x4d1fe5+_0x4960cb(0x1de)});},setMode=({mode:_0x462c36,tusername:_0x3d39a8})=>{const _0x35215d=_0xff3eac;return currentMode=_0x462c36,document[_0x35215d(0x1fe)]=_0x35215d(0x1f8)+_0x462c36,sendTmiMessage({'message':'@'+_0x3d39a8+'\x20'+currentMode+_0x35215d(0x220)});},isAllowed=({tags:_0x1f3f96})=>{const _0x181cef=_0xff3eac;switch(currentMode){case _0x181cef(0x1da):return!![];case'subs':return _0x1f3f96[_0x181cef(0x218)]===channel||_0x1f3f96[_0x181cef(0x206)]||_0x1f3f96[_0x181cef(0x222)]||_0x1f3f96['badges']['vip']==='1';case _0x181cef(0x1e4):return _0x1f3f96[_0x181cef(0x218)]===channel||_0x1f3f96['mod'];default:return![];}},imageLoaded=({src:_0x378756})=>{return new Promise(_0x4baf3e=>{const _0x94fec=_0x2030,_0x19c41f=new Image();_0x19c41f[_0x94fec(0x1e8)]=_0x378756,_0x19c41f[_0x94fec(0x1cd)](_0x94fec(0x1f1),()=>{_0x4baf3e(_0x19c41f['src']);});});},leftGifEl=document['getElementById'](_0xff3eac(0x201)),rightGifEl=document[_0xff3eac(0x211)](_0xff3eac(0x21e)),usernameEl=document[_0xff3eac(0x211)](_0xff3eac(0x218)),setGifViewMode=({mode:_0x468b64})=>{const _0x12c621=_0xff3eac;leftGifEl['dataset']['mode']=_0x468b64,rightGifEl[_0x12c621(0x1e7)][_0x12c621(0x1f3)]=_0x468b64,document[_0x12c621(0x1fe)]='gif_view_mode='+_0x468b64;};setGifViewMode({'mode':readCookie('gif_view_mode')||_0xff3eac(0x1c9)});const modCommands=[_0xff3eac(0x213),_0xff3eac(0x1fa),_0xff3eac(0x1c9),_0xff3eac(0x1e2),_0xff3eac(0x200),_0xff3eac(0x1f9),'duration'],handleCommand=async({command:_0x4379a0,args:_0x202b45,tags:_0x548476})=>{const _0x53cf8b=_0xff3eac;if(_0x4379a0!==_0x53cf8b(0x1d4))return;if(modCommands[_0x53cf8b(0x1fb)](_0x202b45[0x0][_0x53cf8b(0x1ca)]())&&(_0x548476['mod']||_0x548476[_0x53cf8b(0x218)]===channel))switch(_0x202b45[0x0]){case'skip':{const _0x21af89=await imageLoaded({'src':skipGif});leftGifEl[_0x53cf8b(0x1c4)]['backgroundImage']='url('+_0x21af89+')',rightGifEl[_0x53cf8b(0x1c4)][_0x53cf8b(0x1ed)]='url('+_0x21af89+')';break;}case _0x53cf8b(0x1cc):{if(isNaN(_0x202b45[0x1])||_0x202b45[0x1]<=0x0){sendTmiMessage({'message':'@'+_0x548476[_0x53cf8b(0x218)]+'\x20make\x20sure\x20to\x20add\x20a\x20duration\x20in\x20seconds'});break;}gifDuration=Number(_0x202b45[0x1]),sendTmiMessage({'message':'@'+_0x548476[_0x53cf8b(0x218)]+'\x20gif\x20duration\x20set\x20to\x20'+gifDuration+'\x20'+(gifDuration===0x1?'second':_0x53cf8b(0x1d9))});break;}case _0x53cf8b(0x213):if(_0x202b45[0x1]&&!_0x202b45[0x1][_0x53cf8b(0x203)](/\beveryone\b|\bsubs\b|\bmods\b/)){sendTmiMessage({'message':'@'+_0x548476[_0x53cf8b(0x218)]+_0x53cf8b(0x1ea)});break;}setMode({'mode':_0x202b45[0x1],'tusername':_0x548476[_0x53cf8b(0x218)]});break;case _0x53cf8b(0x1fa):setGifViewMode({'mode':_0x53cf8b(0x1fa)});break;case _0x53cf8b(0x1c9):setGifViewMode({'mode':_0x53cf8b(0x1c9)});break;case'ban':if(!_0x202b45[0x1]){sendTmiMessage({'message':'@'+_0x548476['username']+'\x20make\x20sure\x20to\x20add\x20the\x20username'});break;}addToBanList({'banUser':_0x202b45[0x1][_0x53cf8b(0x219)]('@')?_0x202b45[0x1]['slice'](0x1):_0x202b45[0x1],'tusername':_0x548476[_0x53cf8b(0x218)]});break;case _0x53cf8b(0x1f9):if(!_0x202b45[0x1]){sendTmiMessage({'message':'@'+_0x548476[_0x53cf8b(0x218)]+_0x53cf8b(0x204)});break;}removeFromBanList({'banUser':_0x202b45[0x1][_0x53cf8b(0x219)]('@')?_0x202b45[0x1][_0x53cf8b(0x1cb)](0x1):_0x202b45[0x1],'tusername':_0x548476[_0x53cf8b(0x218)]});break;default:{break;}}else{if(gifTimeout)return;if(!_0x202b45[0x0]){sendTmiMessage({'message':'@'+_0x548476['username']+_0x53cf8b(0x21a)});return;}const _0x339576=_0x202b45[0x0][_0x53cf8b(0x203)](/https?:\/\/media\.giphy\.com\/media\/([A-z0-9]+)\/giphy\.gif/)||_0x202b45[0x0][_0x53cf8b(0x203)](/https?:\/\/giphy\.com\/embed\/([A-z0-9]+)/);if(!_0x339576){sendTmiMessage({'message':'@'+_0x548476[_0x53cf8b(0x218)]+'\x20only\x20gifs\x20from\x20giphy.com\x20are\x20allowed!'});return;}if(banList[_0x53cf8b(0x1fb)](_0x548476[_0x53cf8b(0x218)])||!isAllowed({'tags':_0x548476}))return;const _0x43442c=await imageLoaded({'src':'https://media.giphy.com/media/'+_0x339576[0x1]+_0x53cf8b(0x1db)});gifTimeout=!![],window[_0x53cf8b(0x1ef)](()=>{gifTimeout=![];},gifDuration*0x3e8),leftGifEl[_0x53cf8b(0x1c4)][_0x53cf8b(0x1ed)]=_0x53cf8b(0x1e6)+_0x43442c+')',rightGifEl['style'][_0x53cf8b(0x1ed)]=_0x53cf8b(0x1e6)+_0x43442c+')',usernameEl[_0x53cf8b(0x1c4)][_0x53cf8b(0x1eb)]=0.5,usernameEl[_0x53cf8b(0x1fd)]=_0x548476[_0x53cf8b(0x1f4)],window[_0x53cf8b(0x1ef)](()=>{const _0x2ef837=_0x53cf8b;usernameEl[_0x2ef837(0x1c4)][_0x2ef837(0x1eb)]=0x0;},0x6a4);}};client['on'](_0xff3eac(0x1d2),(_0x24f077,_0x5d71a7,_0x3584e8,_0x54c701)=>{const _0x4b2e1c=_0xff3eac;if(_0x54c701||!_0x3584e8[_0x4b2e1c(0x219)]('!'))return;const _0x55f47a=_0x3584e8[_0x4b2e1c(0x1cb)](0x1)[_0x4b2e1c(0x1fa)]('\x20'),_0x31c4d3=_0x55f47a[_0x4b2e1c(0x1d7)]()[_0x4b2e1c(0x1ca)]();if(!_0x31c4d3)return;handleCommand({'command':_0x31c4d3,'args':_0x55f47a,'tags':_0x5d71a7});}),client[_0xff3eac(0x1e3)]();</script>
</body>
</html>