Guest User

Untitled

a guest
Aug 18th, 2014
656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.  
  3. <head>
  4.     <meta name="viewport" content="width=device-width, initial-scale=1">
  5.     <link href="css/bootstrap.css" rel="stylesheet">
  6.     <title>Complete the puzzle!</title>
  7.     <style>
  8.         .show {
  9.             visibility: visible;
  10.         }
  11.         .hide {
  12.             visibility: hidden;
  13.         }
  14.         .merge {
  15.             position: absolute;
  16.             left: 496px;
  17.             top: 5px;
  18.         }
  19.         .merge0 {
  20.             position: absolute;
  21.             left: 300px;
  22.             top: 4px;
  23.         }
  24.         .merge1 {
  25.             position: absolute;
  26.             top: 218px;
  27.             left: 530px;
  28.         }
  29.         .merge2 {
  30.             position: absolute;
  31.             top: 218px;
  32.             left: 688px;
  33.         }
  34.         .row1 {
  35.             position: absolute;
  36.             left: 301px;
  37.             top: 208px;
  38.         }
  39.         .row2 {
  40.             position: absolute;
  41.             top: 476px;
  42.             left: 301px;
  43.             margin: 0;
  44.         }
  45.         .row3 {
  46.             position: absolute;
  47.             top: 495px;
  48.             left: 716px;
  49.             margin: 0;
  50.         }
  51.         .row4 {
  52.             position: absolute;
  53.             top: 691px;
  54.             left: 300px;
  55.             margin: 0;
  56.         }
  57.     </style>
  58.  
  59.     <body style="
  60.        ">
  61.         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  62.         <script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
  63.         <script src="http://documentcloud.github.com/backbone/backbone-min.js"></script>
  64.         <script src="routie.js"></script>
  65.         <script>
  66.             window.location = "http://192.99.246.90/hunt/index.html#hide";
  67.         </script>
  68.         <script>
  69.             window.onload = function() {
  70.                 localStorage.removeItem("alerted");
  71.                 localStorage.removeItem("alerted2");
  72.                 localStorage.removeItem("alerted3");
  73.                 localStorage.removeItem("alerted4");
  74.                 localStorage.removeItem("alerted5");
  75.                 localStorage.removeItem("alerted6");
  76.                 localStorage.removeItem("alerted7");
  77.                 localStorage.removeItem("alerted8");
  78.             }
  79.         </script>
  80.         <script>
  81.             window.onhashchange = function() {
  82.                 var hashArray = location.hash.substr(1).split('/');
  83.                 if (hashArray.indexOf('hide') != -1) {
  84.                     if (hashArray.indexOf('one') != -1) {
  85.                         var alerted = localStorage.getItem('alerted') || '';
  86.                         if (alerted != 'yes') {
  87.                             alert("You found piece number one ");
  88.                             localStorage.setItem('alerted', 'yes');
  89.                         }
  90.                     }
  91.                     if (hashArray.indexOf('two') != -1) {
  92.                         var alerted2 = localStorage.getItem('alerted2') || '';
  93.                         if (alerted2 != 'yes') {
  94.                             alert("You found piece number two ");
  95.                             localStorage.setItem('alerted2', 'yes');
  96.                         }
  97.                     }
  98.                     if (hashArray.indexOf('three') != -1) {
  99.                         var alerted3 = localStorage.getItem('alerted3') || '';
  100.                         if (alerted3 != 'yes') {
  101.                             alert("You found piece number three ");
  102.                             localStorage.setItem('alerted3', 'yes');
  103.                         }
  104.                     }
  105.                     if (hashArray.indexOf('four') != -1) {
  106.                         var alerted4 = localStorage.getItem('alerted4') || '';
  107.                         if (alerted4 != 'yes') {
  108.                             alert("You found piece number four ");
  109.                             localStorage.setItem('alerted4', 'yes');
  110.                         }
  111.                     }
  112.                     if (hashArray.indexOf('five') != -1) {
  113.                         var alerted5 = localStorage.getItem('alerted5') || '';
  114.                         if (alerted5 != 'yes') {
  115.                             alert("You found piece number five ");
  116.                             localStorage.setItem('alerted5', 'yes');
  117.                         }
  118.                     }
  119.                     if (hashArray.indexOf('six') != -1) {
  120.                         var alerted6 = localStorage.getItem('alerted6') || '';
  121.                         if (alerted6 != 'yes') {
  122.                             alert("You found piece number six ");
  123.                             localStorage.setItem('alerted6', 'yes');
  124.                         }
  125.                     }
  126.                     if (hashArray.indexOf('seven') != -1) {
  127.                         var alerted7 = localStorage.getItem('alerted7') || '';
  128.                         if (alerted7 != 'yes') {
  129.                             alert("You found piece number seven ");
  130.                             localStorage.setItem('alerted7', 'yes');
  131.                         }
  132.                     }
  133.                     if (hashArray.indexOf('eight') != -1) {
  134.                         var alerted8 = localStorage.getItem('alerted8') || '';
  135.                         if (alerted8 != 'yes') {
  136.                             alert("You found piece number eight ");
  137.                             localStorage.setItem('alerted8', 'yes');
  138.                         }
  139.                     }
  140.                     if (hashArray.indexOf('eight') != -1) {
  141.                         var alerted8 = localStorage.getItem('alerted8') || '';
  142.                         if (alerted8 != 'yes') {
  143.                             alert("You found piece number eight ");
  144.                             localStorage.setItem('alerted8', 'yes');
  145.                         }
  146.                     }
  147.                 }
  148.             }
  149.         </script>
  150.         <div>
  151.             <table id="table" border="0" cellpadding="0" cellspacing="5" align="center">
  152.                 <tr>
  153.                     <td id="one">
  154.                         <img src="1.png" class="merge0">
  155.                     </td>
  156.                     <td id="two">
  157.                         <img id="2" src="6.png" class="merge">
  158.                     </td>
  159.                     <td>
  160.                     </td>
  161.                 </tr>
  162.                 <tr>
  163.                     <td id="three">
  164.                         <img src="4.png" class="row1">
  165.                     </td>
  166.                     <td id="four">
  167.                         <img src="2.png" class="merge1">
  168.                     </td>
  169.                     <td id="five">
  170.                         <img src="7.png" class="merge2">
  171.                     </td>
  172.                 </tr>
  173.                 <tr>
  174.                     <td id="six">
  175.                         <img src="8.png" class="row2">
  176.                     </td>
  177.                     <td id="seven">
  178.                         <img src="5.png" class="row3">
  179.                     </td>
  180.                     <td id="eight">
  181.                         <img src="3.png" class="row4">
  182.                     </td>
  183.                 </tr>
  184.             </table>
  185.         </div>
  186.         <script src="js/bootstrap.js"></script>
  187.         <br/>
  188.         <a onclick="myFunction1()">Delete local data</a>
  189.         <br/>
  190.         <script>
  191.             function myFunction1() {
  192.                 localStorage.removeItem("alerted");
  193.                 localStorage.removeItem("alerted2");
  194.                 localStorage.removeItem("alerted3");
  195.                 localStorage.removeItem("alerted4");
  196.                 localStorage.removeItem("alerted5");
  197.                 localStorage.removeItem("alerted6");
  198.                 localStorage.removeItem("alerted7");
  199.                 localStorage.removeItem("alerted8");
  200.             }
  201.         </script>
  202.         <a href="index.html">Reload</a>
  203.         <br/>
  204.         <br/>
  205.         <a onclick="addHash('/one');">One</a>
  206.         <br/>
  207.         <a onclick="addHash('/two');">Two</a>
  208.         <br/>
  209.         <a onclick="addHash('/three');">Three</a>
  210.         <br/>
  211.         <a onclick="addHash('/four');">Four</a>
  212.         <br/>
  213.         <a onclick="addHash('/five');">Five</a>
  214.         <br/>
  215.         <a onclick="addHash('/six');">Six</a>
  216.         <br/>
  217.         <a onclick="addHash('/seven');">Seven</a>
  218.         <br/>
  219.         <a onclick="addHash('/eight');">Eight</a>
  220.         <script>
  221.             function addHash(hash) {
  222.                 window.location.hash = window.location.hash + hash;
  223.             }
  224.         </script>
  225.         <script>
  226.             function hideone() {
  227.                 var elem = document.getElementById("one");
  228.                 elem.className = "hide";
  229.             }
  230.         </script>
  231.         <script>
  232.             function showone() {
  233.                 var elem = document.getElementById("one");
  234.                 if (elem.className = "hide") {
  235.                     elem.className = "show"
  236.                 }
  237.             }
  238.         </script>
  239.         <script>
  240.             function hidetwo() {
  241.                 var elem = document.getElementById("two");
  242.                 elem.className = "hide";
  243.             }
  244.         </script>
  245.         <script>
  246.             function showtwo() {
  247.                 var elem = document.getElementById("two");
  248.                 if (elem.className = "hide") {
  249.                     elem.className = "show"
  250.                 }
  251.             }
  252.         </script>
  253.         <script>
  254.             function hidethree() {
  255.                 var elem = document.getElementById("three");
  256.                 elem.className = "hide";
  257.             }
  258.         </script>
  259.         <script>
  260.             function showthree() {
  261.                 var elem = document.getElementById("three");
  262.                 if (elem.className = "hide") {
  263.                     elem.className = "show"
  264.                 }
  265.             }
  266.         </script>
  267.         <script>
  268.             function hidefour() {
  269.                 var elem = document.getElementById("four");
  270.                 elem.className = "hide";
  271.             }
  272.         </script>
  273.         <script>
  274.             function showfour() {
  275.                 var elem = document.getElementById("four");
  276.                 if (elem.className = "hide") {
  277.                     elem.className = "show"
  278.                 }
  279.             }
  280.         </script>
  281.         <script>
  282.             function hidefive() {
  283.                 var elem = document.getElementById("five");
  284.                 elem.className = "hide";
  285.             }
  286.         </script>
  287.         <script>
  288.             function showfive() {
  289.                 var elem = document.getElementById("five");
  290.                 if (elem.className = "hide") {
  291.                     elem.className = "show"
  292.                 }
  293.             }
  294.         </script>
  295.         <script>
  296.             function hidesix() {
  297.                 var elem = document.getElementById("six");
  298.                 elem.className = "hide";
  299.             }
  300.         </script>
  301.         <script>
  302.             function showsix() {
  303.                 var elem = document.getElementById("six");
  304.                 if (elem.className = "hide") {
  305.                     elem.className = "show"
  306.                 }
  307.             }
  308.         </script>
  309.         <script>
  310.             function hideseven() {
  311.                 var elem = document.getElementById("seven");
  312.                 elem.className = "hide";
  313.             }
  314.         </script>
  315.         <script>
  316.             function showseven() {
  317.                 var elem = document.getElementById("seven");
  318.                 if (elem.className = "hide") {
  319.                     elem.className = "show"
  320.                 }
  321.             }
  322.         </script>
  323.         <script>
  324.             function hideeight() {
  325.                 var elem = document.getElementById("eight");
  326.                 elem.className = "hide";
  327.             }
  328.         </script>
  329.         <script>
  330.             function showeight() {
  331.                 var elem = document.getElementById("eight");
  332.                 if (elem.className = "hide") {
  333.                     elem.className = "show"
  334.                 }
  335.             }
  336.         </script>
  337.         <script>
  338.             $(function() {
  339.                 var hideMany = function() {
  340.                     var toHide = [].slice.call(arguments);
  341.                     toHide.forEach(function(id) {
  342.                         if (id === null) {
  343.                             return
  344.                         }
  345.                         var elem = document.getElementById(id);
  346.                         if (elem) {
  347.                             elem.className = "hide";
  348.                         }
  349.                     });
  350.                 };
  351.  
  352.                 var Workspace = Backbone.Router.extend({
  353.                     routes: {
  354.                         "hide(/:a)(/:b)(/:c)(/:d)(/:e)(/:f)(/:g)(/:h)": "test"
  355.                     },
  356.                     test: hideMany
  357.                 });
  358.  
  359.                 var router = new Workspace();
  360.                 Backbone.history.start();
  361.  
  362.             });
  363.         </script>
  364.     </body>
  365. </head>
  366.  
  367. </html>
Advertisement
Add Comment
Please, Sign In to add comment