Advertisement
rizky21id

Your Shortcut

Jun 4th, 2017
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.70 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <!--
  3.  
  4. Author: Rizky21ID 2k17
  5. Facebook: https://fb.com/Rizky21ID
  6. Compatibility: Mozilla Firefox, Google Chrome
  7. Useage: MouseWheel, Touch, Key[1-9,num 1-9,left,right,A,D]
  8.  
  9. -->
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  13. <title>Your Shortcut</title>
  14.  
  15. <style type="text/css">
  16. html,body {
  17. margin: 0; padding: 0; width: 100%; height: 100%; color: #FFF;
  18. font-family: "Liberation Sans", "Dejavu Sans", "Segoe UI", Tahoma; font-size: 10pt;
  19. }
  20. #perspective {
  21. position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  22. background: transparent;
  23. }
  24. #preset {
  25. position: absolute; top: 0; left: 0; width: 100%; height: 48px;
  26. text-align: center; vertical-align: middle; line-height: 48px;
  27. background: #000; color: #FFF; display: none; z-index: 1000;
  28. }
  29.  
  30. a:link {
  31. color: #FFF; text-decoration: none; opacity: 0.7;
  32. min-width: 150px; margin-left: 0px;
  33. transition: 0.2s ease-in; display: inline-block;
  34. cursor: default; /* (pointer|default) */
  35. }
  36. a:hover {
  37. color: #FFF; text-decoration: none; opacity: 1.0;
  38. min-width: 155px; margin-left: -5px; /* (-5px|5px) link move left or right */
  39. transition: 0.2s ease-out;
  40. }
  41. a:active { color: #FFF; }
  42. a:visited { color: #FFF; }
  43.  
  44. input[type="text"] {
  45. width: 20px; border: 0;
  46. opacity: 0.8; border-radius: 1px;
  47. margin: 1px; padding: 2px 2px; transition: 0.3s ease;
  48. cursor: default; /* (pointer|default) */
  49. }
  50. input[type="text"]:hover { width: 30px; }
  51. input[type="text"]:focus { width: 150px; opacity: 1.0; transition: 0.3s ease; cursor: text; }
  52. *:focus { outline: none; }
  53.  
  54. .container {
  55. position: fixed; top: 30%; left: 50%; width: 150px; height: auto;
  56. margin-left: -75px; margin-top: -20px; /* Vertical Align */
  57. overflow: visible; white-space: nowrap;
  58. transition: 1s ease; /* Animation speed/time */
  59. }
  60. .container label {
  61. border-bottom: 1px solid #FFF;
  62. display: block; font-weight: bold;
  63. }
  64. /*#box-3 { margin-left: -75px; opacity: 1; }*/ /* Selected box */
  65. #search td:nth-child(1) { text-align: right; }
  66. #search label { border: 0; font-weight: normal; opacity: 0.8; padding-right: 10px; }
  67.  
  68. #switch {
  69. position: fixed; bottom: 10%; left: 0; width: 100%; height: 16px;
  70. margin-left: 0px; cursor: default;
  71. opacity: 0.7; transition: 0.3s ease-in;
  72. text-align: center; visibility: hidden;
  73. }
  74. #switch:hover { opacity: 1.0; transition: 0.3s ease-out; }
  75. .switch {
  76. display: inline-block; width: 10px; height: 10px;
  77. border: 1px solid transparent; border-radius: 10px;
  78. background: transparent; transition: 0.3s ease-in;
  79. cursor: default; /* (pointer|default) */
  80. }
  81.  
  82. #shadow-top {
  83. position: fixed; top: 0; left: 0; width: 100%; height: 5px; margin-top: -5px;
  84. background: #000; box-shadow: 0 0 100px 0 #000; opacity: 0.5;
  85. }
  86. #shadow-bot {
  87. position: fixed; bottom: 0; left: 0; width: 100%; height: 5px; margin-bottom: -5px;
  88. background: #000; box-shadow: 0 0 100px 0 #000; opacity: 0.5;
  89. }
  90.  
  91. #waifu-left {
  92. position: fixed; display: none; bottom: 0; left: 0;
  93. max-width: 512px; max-height: 256px;
  94. opacity: 0.9; /* Settings waifu-left */
  95. }
  96. #waifu-right {
  97. position: fixed; display: none; bottom: 0; right: 0;
  98. max-width: 512px; max-height: 256px;
  99. opacity: 0.9; /* Settings waifu-right */
  100. }
  101. </style>
  102. <script type="text/javascript" language="javascript">
  103. var $=function(id) { return document.getElementById(id); };
  104.  
  105.  
  106. // + ------------------------------------ Settings (JS) - BEGIN ------------------------------------ +
  107.  
  108. var presets=[ // curve x3(x2), margins x3(x2), translateZ x3(x2), rotation x3(x7), dim x3
  109. [0,0,0, 0,0,0, -350,-700,-1050, 350,700,1050, 0,0,0, 0,0,0, 0,30,0 ,0,60,0 ,0,90,0 ,0,-30,0 ,0,-60,0 ,0,-90,0 ,0,0,0, 30,10,0], // Preset 1
  110. [0,0,0, 0,0,0, -350,-700,-700, 350,700,700, 0,0,0, 0,0,0, 0,45,0, 0,90,0, 0,90,0, 0,-45,0, 0,-90,0, 0,-90,0, 0,0,0, 25,0,0], // Preset 2
  111. [0,0,0, 0,0,0, -350,-700,-1050, 350,700,1050, 0,0,0, 0,0,0, 0,0,-45, 0,0,-90, 0,0,-130, 0,0,45, 0,0,90, 0,0,130, 0,0,0, 30,10,0], // Preset 3
  112. [0,0,0, 0,0,0, -350,-700,-700, 350,700,700, 0,0,0, 0,0,0, 0,0,-90, 0,0,-179, 0,0,-179, 0,0,90, 0,0,179, 0,0,179, 0,0,0, 25,0,0], // Preset 4
  113. [0,0,0, 0,0,0, -350,-700,-700, 350,700,700, 0,0,0, 0,0,0, 0,179,0, 0,90,0, 0,90,0, 0,179,0, 0,90,0, 0,90,0, 0,0,0, 25,0,0], // Preset 5
  114. [0,0,0, 0,0,0, -330,-650,-920, 330,650,920, 30,160,280, 30,160,280, 0,20,0, 0,40,0, 0,60,0, 0,-20,0, 0,-40,0, 0,-60,0, 0,0,0, 30,10,0], // Preset 6
  115. [0,0,0, 0,0,0, -350,-700,-700, 350,700,700, 0,0,0, 0,0,0, 0,45,45, 0,135,135, 0,135,135, 0,-45,-45, 0,-135,-135, 0,135,135, 0,0,0, 25,0,0], // Preset 7
  116. ];
  117. var preset = 2; // 0 = null (Custom settings) (1,3 and 6 is widescreen)
  118. var displayPreset = false; // Output current settings as preset string
  119.  
  120. // * = loaded from preset
  121. var pg = 3; // Selected box
  122. var searchBox = 3; // Box containing search engines/input fields (see "links")
  123. var dim = [ 30, 10, 0 ]; // * Opacity: 0-100 (step1,step2,step3) (%)
  124. var dimColor = "#524c59"; // Text input dim color
  125. var background = "#14101c"; // Background color
  126. var color = "#d6ccdc"; // Text/Link color
  127. var autoFocus = "search-1" // "" = none | default: "search-1"
  128.  
  129. var enableScroll = true; // Enable/Disable the posibility to scroll boxes
  130. var enableTags = true; // Show/Hide switch buttons/tags
  131. var enableKeys = true; // Allow key navigation when search field is not active
  132. var enableTouch = true; // Enable touch screen support
  133. var enableTitle = false; // Enable clickable box titles/content
  134.  
  135. var invertScroll = false; // Invert mouse wheel
  136. var useScrollLock = true; // Delay next scroll trigger (prevents box skip)
  137. var scrollLockMS = 300; // Wait in milliseconds
  138. var edgeBlock = false; // Block scrolling past the edge
  139.  
  140. var curve=[ // Vertical movement (marginTop)
  141. [ 0, 0, 0], // * Left side (step1,step2,step3)
  142. [ 0, 0, 0] // * Right side (step1,step2,step3)
  143. ];
  144. var margins=[ // Horizontal movment (MarginLeft)
  145. [ 0, 0, 0], // * Left side (step1,step2,step3)
  146. [ 0, 0, 0] // * Right side (step1,step2,step3)
  147. ];
  148. var marginT=-20; // Default marginTop
  149. var marginC=-75; // Default marginLeft (center)
  150.  
  151. var translateZ=[ // Depth movement (z-index)
  152. [ 0, 0, 0], // * Left side (step1,step2,step3)
  153. [ 0, 0, 0] // * Right side (step1,step2,step3)
  154. ];
  155. var perspective=800;
  156.  
  157. var rotation=[ // [ X, Y, Z] Degree (angle)
  158. [ 0, 0, 0], [ 0, 0, 0], [ 0, 0, 0], // * Left side (step1,step2,step3)
  159. [ 0, 0, 0], [ 0, 0, 0], [ 0, 0, 0], // * Right side (step1,step2,step3)
  160. [ 0, 0, 0] // * Center/Default
  161. ];
  162.  
  163. var waifu=[ // "./waifu-left.png", "./waifu-right.png" ("" = none)
  164. "", ""
  165. ];
  166.  
  167. var boxSetup=[ // Format: ["Title", "#color"],
  168. ["News", "#d99395"], // box-1
  169. ["4-Chan", "#c4d1a1"], // box-2
  170. ["Search", "#9bb6d4"], // box-3
  171. ["About Deface", "#db9cbe"], // box-4
  172. ["Other", "#d1c894"], // box-5
  173. ["About Me", "#d1c894"], // box-6
  174. ];
  175.  
  176. // Link setup (separate with "---", "---" (must not exceed boxSetup))
  177. // Format: ["Name", "URL"],
  178. var links=[
  179. // News - box-1
  180. ["Arch Linux", "http://archlinux.org"],
  181. ["Dagbladet", "http://dagbladet.no"],
  182. ["Gamer", "http://gamer.no"],
  183. ["GameSpot", "http://gamespot.com"],
  184. ["Hardware", "http://hardware.no"],
  185. ["IGN", "http://ign.com"],
  186. ["IT-Avisen", "http://itavisen.no"],
  187. ["NRK", "http://nrk.no"],
  188. ["OA", "http://oa.no"],
  189. ["PressFire", "http://pressfire.no"],
  190. ["Teknofil", "http://teknofil.no"],
  191. ["TorrentFreak", "http://torrentfreak.com"],
  192. ["VG", "http://vg.no"],
  193.  
  194. ["---", "---"],
  195.  
  196. // 4Chan - box-2
  197. ["/e/ - Ecchi", "https://boards.4chan.org/e/"],
  198. ["/g/ - Technology", "https://boards.4chan.org/g/"],
  199. ["/gif/ - Adult GIF", "https://boards.4chan.org/gif/"],
  200. ["/h/ - Hentai", "https://boards.4chan.org/h/"],
  201. ["/mlp/ - Pony", "https://boards.4chan.org/mlp/"],
  202. ["/mu/ - Music", "https://boards.4chan.org/mu/"],
  203. ["/pol/ - Politically Incorrect", "https://boards.4chan.org/pol/"],
  204. ["/wg/ - Wallpaper General", "https://boards.4chan.org/wg/"],
  205. ["/wsg/ - Worksafe GIF", "https://boards.4chan.org/wsg/"],
  206. ["/x/ - Paranormal", "https://boards.4chan.org/x/"],
  207.  
  208. ["---", "---"],
  209.  
  210. // Search - box-3
  211. ["Google", "https://www.google.no/#q="],
  212. ["Images", "https://www.google.no/search?tbm=isch&q="],
  213. ["YouTube", "https://www.youtube.com/results?search_query="],
  214. ["Wikipedia", "http://en.wikipedia.org/w/index.php?search="],
  215. ["IMDb", "http://www.imdb.com/find?q="],
  216. ["Urban Dictionary", "http://www.urbandictionary.com/define.php?term="],
  217.  
  218. ["---", "---"],
  219.  
  220. // About Deface - box-4
  221. ["Defacer ID", "https://defacer.id/"],
  222. ["Zone-H", "http://zone-h.org/"],
  223. ["Zone Deface", "http://zonedeface.org/"],
  224. ["Maxteroit Blog", "http://maxteroit.com/"],
  225. ["Black Exploded Blog", "http://cowokerensteam.blogspot.com/"],
  226. ["IndoXploit Blog", "http://www.indoxploit.or.id/"],
  227. ["TKJ Cyber Art Blog", "http://www.tkjcyberart.org/"],
  228. ["CSRF Online", "http://brimobpapua.com/files/aq.php"],
  229. ["Reverse IP Tool", "http://www.yougetsignal.com/tools/web-sites-on-web-server/"],
  230. ["HomeRoot Uploader Script", "https://pastebin.com/2Njd70Fv"],
  231. ["Bypass Shell Size Script", "https://pastebin.com/yb7FrWts"],
  232.  
  233. ["---", "---"],
  234.  
  235. // Other - box-5
  236. ["Altinn", "https://www.altinn.no/"],
  237. ["CockMail", "https://mail.cock.li"],
  238. ["DnB", "http://www.dnb.no/en/"],
  239. ["Dropbox", "https://www.dropbox.com"],
  240. ["Facebook", "http://facebook.com"],
  241. ["Outlook", "http://outlook.com"],
  242. ["Pastebin", "http://pastebin.com"],
  243. ["PayPal", "http://www.paypal.com/"],
  244. ["Userstyles", "http://userstyles.org/"],
  245. ["Wallbase", "http://wallbase.cc"],
  246.  
  247. ["---", "---"],
  248.  
  249. // About Me - box-6
  250. ["My Facebook", "https://fb.com/Rizky21ID"],
  251. ["My Email", "[email protected]"],
  252. ["Owl Squad FansPage", "http://fb.com/owlsquad.id"],
  253. ["Owl Squad Group", "https://fb.com/owlsquadtoday"],
  254. ["My Instagram", "http://instagram/rizky21id"],
  255. ["My Pastebin", "http://pastebin.com/u/rizky21id"],
  256. ["Pastebin", "http://pastebin.com"],
  257. ["My Blog", "https://nonametrikblog.blogspot.com/"],
  258.  
  259. ];
  260.  
  261. // + ------------------------------------- Settings (JS) - END ------------------------------------- +
  262.  
  263.  
  264. function init() {
  265. var body=document.getElementsByTagName('body')[0];
  266. body.style.background=background;
  267. body.style.color=color;
  268.  
  269. if(preset>0) { // load preset
  270. var p=preset-1;
  271.  
  272. var e=0,f=0,g=0;
  273. for(var i=0;i<=17;i++) {
  274. switch(e) {
  275. case 0: curve[g][f]=presets[p][i]; break;
  276. case 1: margins[g][f]=presets[p][i]; break;
  277. case 2: translateZ[g][f]=presets[p][i]; break;
  278. }
  279.  
  280. f++; if(f>=3) { f=0; if(g==0) { g=1; } else { g=0; e++; } }
  281. }
  282.  
  283. var a=0,b=0;
  284. for(var i=18;i<=38;i++) {
  285. rotation[a][b]=presets[p][i];
  286. b++; if(b>=3) { b=0; a++; }
  287. }
  288.  
  289. var d=39;
  290. for(var i=0;i<3;i++) { dim[i]=presets[p][d]; d++; }
  291. }
  292.  
  293. //$('perspective').style.perspective=perspective+"px";
  294.  
  295. if(body.addEventListener) {
  296. body.addEventListener("mousewheel", MouseWheelHandler, false);
  297. body.addEventListener("DOMMouseScroll", MouseWheelHandler, false);
  298. } else {
  299. body.attachEvent("onmousewheel", MouseWheelHandler);
  300. }
  301.  
  302. clear();
  303. build();
  304.  
  305. var linkTags=document.getElementsByTagName('a');
  306. for(var a=0;a<linkTags.length;a++) { linkTags[a].style.color=color; }
  307.  
  308. var inputTags=document.getElementsByTagName('input');
  309. for(var i=0;i<inputTags.length;i++) { inputTags[i].style.color=background; }
  310.  
  311. var switchClass=document.getElementsByClassName('switch');
  312. for(var c=0;c<switchClass.length;c++) { switchClass[c].style.borderColor=color; }
  313.  
  314. if(enableTags) { $('switch').style.visibility="visible"; }
  315.  
  316. cleanup();
  317.  
  318. if(autoFocus.length>0) { $(autoFocus).focus(); }
  319.  
  320. if(displayPreset) { // generate and display preset
  321. var genPreset="["+curve[0][0]+","+curve[0][1]+","+curve[0][2]+", "+curve[1][0]+","+curve[1][1]+","+curve[1][2]+", \
  322. "+ margins[0][0]+","+margins[0][1]+","+margins[0][2]+", "+margins[1][0]+","+margins[1][1]+","+margins[1][2]+", \
  323. "+ translateZ[0][0]+","+translateZ[0][1]+","+translateZ[0][2]+", "+translateZ[1][0]+","+translateZ[1][1]+","+translateZ[1][2]+", ";
  324.  
  325. var a=0;b=0;
  326. for(i=0;i<21;i++) {
  327. genPreset+=rotation[a][b];
  328.  
  329. if(b>=2) { b=0; a++; if(a<rotation.length) { genPreset+=" ,"; } }
  330. else { b++; genPreset+=","; }
  331. }
  332. genPreset+="],";
  333.  
  334. //prompt("Animation preset : ",genPreset);
  335. $('preset').innerHTML="Animation preset : "+genPreset;
  336. $('preset').style.display="block";
  337. }
  338. }
  339.  
  340. function clear() {
  341. $('boxes').innerHTML="";
  342. $('switch').innerHTML="";
  343.  
  344. for(var i=0;i<=boxSetup.length-1;i++) {
  345. $('boxes').innerHTML+="<div id='box-"+(i+1)+"' class='container'></div>\n";
  346. $('switch').innerHTML+="<div id='pg-"+(i+1)+"' class='switch' onclick='javascript:go("+(i+1)+");'></div> \n";
  347.  
  348. var onclick;
  349. if(enableTitle) { onclick="javascript:go("+(i+1)+");"; } else { onclick=""; }
  350.  
  351. if((i+1)==searchBox) {
  352. $('box-'+searchBox).innerHTML="<label style='color: "+boxSetup[(searchBox-1)][1]+"; \
  353. "+ "border-color: "+boxSetup[i][1]+";' onclick='"+onclick+"'>"+boxSetup[i][0]+"</label></br />\
  354. "+ "<table id='search' border='0' cellspacing='0' cellpadding='0'>\
  355. "+ "<tr><td></td><td></td></tr></table>\n";
  356. } else {
  357. $('box-'+(i+1)).innerHTML="<label style='color: "+boxSetup[i][1]+"; \
  358. "+ "border-color: "+boxSetup[i][1]+";' onclick='"+onclick+"'>"+boxSetup[i][0]+"</label></br />\n";
  359. }
  360. }
  361.  
  362. if(waifu[0]!="") {
  363. $('waifu-left').style.display="block";
  364. $('waifu-left').src=waifu[0];
  365. }
  366. if(waifu[1]!="") {
  367. $('waifu-right').style.display="block";
  368. $('waifu-right').src=waifu[1];
  369. }
  370. }
  371.  
  372. function build() {
  373. var skip=false,c=1,r=1;
  374. for(var i=0;i<=links.length-1;i++) {
  375. if(links[i][0]=="---" && links[i][1]=="---") { skip=true; c++; }
  376.  
  377. if(!skip) {
  378. if(c==searchBox) {
  379. // search engines
  380. var table=$('search');
  381. var row=table.insertRow(r);
  382. var cell1=row.insertCell(0),cell2=row.insertCell(1);
  383.  
  384. cell1.innerHTML="<label for='search-"+r+"'>"+links[i][0]+"</label>";
  385. cell2.innerHTML="<input id='search-"+r+"' type='text' value='' \
  386. "+ "onfocus='javascript:activeInput=true;if(searchBox!=pg) go(searchBox);' onblur='javascript:activeInput=false;' \
  387. "+ "onkeypress='javascript:handleKeyPress(event,\""+links[i][1]+"\",this.value);' />";
  388.  
  389. r++;
  390. } else {
  391. // links
  392. var lnk_js=["",""];
  393. if(enableTitle) { lnk_js=["javascript:open(\"","\");"]; }
  394. $('box-'+c).innerHTML+="<a href='"+lnk_js[0]+links[i][1]+lnk_js[1]+"' target='_self'>"+links[i][0]+"</a><br />";
  395. }
  396. }
  397.  
  398. skip=false;
  399. }
  400. }
  401.  
  402. function cleanup() {
  403. var input=document.getElementsByTagName('input');
  404. if(pg==searchBox) { for(var i=0;i<=input.length-1;i++) { input[i].style.background=color; } }
  405. else { for(var i=0;i<=input.length-1;i++) { input[i].style.background=dimColor; } }
  406.  
  407. for(var i=1;i<=boxSetup.length;i++) { $('pg-'+i).style.background="transparent"; }
  408. $('pg-'+pg).style.background=color;
  409.  
  410. var b=0,c=0,steps=parseInt(rotation.length/2);
  411. if(pg>=2) { // left side
  412. for(var i=(pg-1);i>=1;i--) {
  413. $('box-'+i).style.cssText="opacity: "+(parseFloat(dim[c]/100))+"; \
  414. "+ "margin-left: "+(margins[0][c]+marginC)+"px; margin-top: "+(curve[0][c]+marginT)+"px; \
  415. "+ "-moz-transform: perspective("+perspective+"px) translateZ("+translateZ[0][c]+"px) \
  416. "+ "rotateZ("+rotation[b][2]+"deg) rotateY("+rotation[b][1]+"deg) rotateX("+rotation[b][0]+"deg); \
  417. "+ "-webkit-transform: perspective("+perspective+"px) translateZ("+translateZ[0][c]+"px) \
  418. "+ "rotateZ("+rotation[b][2]+"deg) rotateY("+rotation[b][1]+"deg) rotateX("+rotation[b][0]+"deg);";
  419.  
  420. if(c<steps-1) { c++; b++; }
  421. }
  422. }
  423.  
  424. b=steps;c=0;
  425. if(pg<=boxSetup.length) { // right side
  426. for(var i=(pg+1);i<=boxSetup.length;i++) {
  427. $('box-'+i).style.cssText="opacity: "+(parseFloat(dim[c]/100))+"; \
  428. "+ "margin-left: "+(margins[1][c]+marginC)+"px; margin-top: "+(curve[1][c]+marginT)+"px; \
  429. "+ "-moz-transform: perspective("+perspective+"px) translateZ("+translateZ[1][c]+"px) \
  430. "+ "rotateZ("+rotation[b][2]+"deg) rotateY("+rotation[b][1]+"deg) rotateX("+rotation[b][0]+"deg); \
  431. "+ "-webkit-transform: perspective("+perspective+"px) translateZ("+translateZ[0][c]+"px) \
  432. "+ "rotateZ("+rotation[b][2]+"deg) rotateY("+rotation[b][1]+"deg) rotateX("+rotation[b][0]+"deg);";
  433.  
  434. if(c<steps-1) { c++; b++; }
  435. }
  436. }
  437. }
  438.  
  439. function move(p) {
  440. var c=rotation.length-1;
  441.  
  442. $('box-'+pg).style.cssText="opacity: 1.0; \
  443. "+ "margin-left: "+marginC+"px; margin-top: "+marginT+"px; \
  444. "+ "-moz-transform: perspective("+perspective+"px) translateZ(0px) \
  445. "+ "rotateZ("+rotation[c][2]+"deg) rotateY("+rotation[c][1]+"deg) rotateX("+rotation[c][0]+"deg); \
  446. "+ "-webkit-transform: perspective("+perspective+"px) translateZ(0px) \
  447. "+ "rotateZ("+rotation[c][2]+"deg) rotateY("+rotation[c][1]+"deg) rotateX("+rotation[c][0]+"deg);";
  448.  
  449. cleanup();
  450. }
  451.  
  452. function go(x) { // switch using tags
  453. if(x!=pg) {
  454. if(x>pg) while(x>pg) { move(pg++); }
  455. else while(x<pg) { move(pg--); }
  456. }
  457. }
  458.  
  459. function open(url) { // url handler w/ clickable boxes
  460. var x=1;
  461. for(var i=0; i<links.length; i++) {
  462. if((links[i][1]==url && x==pg) || !enableTitle) { window.location=url; }
  463. else if(links[i][1]==url) { go(x); }
  464.  
  465. if(links[i][0]=="---" && links[i][1]=="---") { x++; }
  466. }
  467. }
  468.  
  469. function handleKeyPress(e,url,q) { // query
  470. var key=e.keyCode || e.which
  471. if(key==13) { window.location=url+q; }
  472. }
  473.  
  474. var scrollLock=false,sl_timer;
  475. function MouseWheelHandler(e) { // scroll navigation
  476. var e=window.event || e;
  477. var delta=Math.max(-1,Math.min(1,(e.wheelDelta || -e.detail)));
  478.  
  479. if((!scrollLock || !useScrollLock) && enableScroll) {
  480. if(!invertScroll) {
  481. if(delta==-1 && pg<boxSetup.length) { move(pg++); }
  482. else if(delta==-1 && pg==boxSetup.length && !edgeBlock) { go(1); }
  483. if(delta==1 && pg>1) { move(pg--); }
  484. else if(delta==1 && pg==1 && !edgeBlock) { go(boxSetup.length); }
  485. } else {
  486. if(delta==1 && pg<boxSetup.length) { move(pg++); }
  487. else if(delta==1 && pg==boxSetup.length && !edgeBlock) { go(1); }
  488. if(delta==-1 && pg>1) { move(pg--); }
  489. else if(delta==-1 && pg==1 && !edgeBlock) { go(boxSetup.length); }
  490. }
  491.  
  492. if(useScrollLock) {
  493. scrollLock=true; clearTimeout(sl_timer);
  494. sl_timer=setTimeout("scrollLock=false",scrollLockMS);
  495. }
  496. }
  497.  
  498. return false;
  499. }
  500.  
  501. var activeInput=false;
  502. document.onkeydown=function(e) { // key navigation
  503. if(!activeInput && enableKeys) {
  504. var key=e.keyCode || e.which
  505.  
  506. if(key>=49 && (key<=57 && key<=(48+boxSetup.length))) { go(key-48); } // key 1-9
  507. if(key>=97 && (key<=105 && key<=(96+boxSetup.length))) { go(key-96); } // num key 1-9
  508.  
  509. if((key==37 || key==65) && pg>1) { move(pg--); } // key left and A
  510. else if((key==37 || key==65) && pg==1 && !edgeBlock) { go(boxSetup.length); }
  511. if((key==39 || key==68) && pg<boxSetup.length) { move(pg++); } // key right and D
  512. else if((key==39 || key==68) && pg==boxSetup.length && !edgeBlock) { go(1); }
  513. }
  514. }
  515.  
  516. var cX,tT;
  517. document.ontouchstart=function(e) { cX=e.touches[0].clientX; }
  518. document.ontouchmove= function(e) { // touch navigation
  519. clearTimeout(tT);
  520. tT=setTimeout(function() {
  521. var X=e.touches[0].clientX;
  522.  
  523. if(((X>=(cX+1)) && pg>1) && enableTouch) { move(pg--); }
  524. else if(((X>=(cX+1)) && pg==1) && enableTouch && !edgeBlock) { go(boxSetup.length); }
  525. if(((X<=(cX-1)) && pg<boxSetup.length) && enableTouch) { move(pg++); }
  526. else if(((X<=(cX-1)) && pg==boxSetup.length) && enableTouch && !edgeBlock) { go(1); }
  527. },25);
  528. }
  529. </script>
  530. </head>
  531. <body onload="javascript:init();">
  532.  
  533. <div id="perspective">
  534. <div id="boxes"></div>
  535. </div>
  536. <div id="switch"></div>
  537.  
  538. <img src="" id="waifu-left" />
  539. <img src="" id="waifu-right" />
  540.  
  541. <div id="shadow-top"></div>
  542. <div id="shadow-bot"></div>
  543.  
  544. <div id="preset"></div>
  545.  
  546. </body>
  547. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement