Hey guys, just a quick post to tell you about my latest plugin, a panic button for Glype.

As always, you can view this live at my main proxy ipBgone to see how it works before you install it yourself.

What this plugin does is preload a static.png (about 8kb filesize) on every pageload of google's homepage. This means that when the button is clicked it will replace everything on the page instantly and without much, if any, lag.

Installation notes:

  • place the panic.png in your plugins directory ie ***/plugins/
  • place the framedForm.inc.php in your default theme directory OR in your current theme directory ie. ***/themes/default/


Download link: Panic Button For Glype!

And as always, here's the source code for the plugin itself.

PHP Code:
<style type="text/css">
   /* Make room for the mini-form */
   html body { position: absolute; top: 60px; width: 100%;}
   
   /* Reset all styles */
   #include * {
      text-align: left;
      border: 0; padding: 0; margin: 0;
      font: 12px Verdana,Arial,Tahoma;
      color: #eee;
      font-weight: normal;
      background: transparent;
      text-decoration: none;
      display: inline;
   }
   #include p {
      margin: 4px 0 0 10px;
      display: block;
   }
   #include b {
      font-weight: bold;
   }
   #include script {
      display:none;
   }
   
   /* Style the mini-form div */
   #include {
      position: absolute;
      border-top: 3px solid #FF2020;
      border-bottom: 3px solid #FF2020;
      background: #0b1933;
      position: absolute;
      top:-60px; left:0;
      width: 100%;
      height: 50px;
      z-index: 100000;
   }
   
   /* Mini-form elements */
   #include a {
      color: #A00000;
   }
   #include a:hover {
      color: #FF2020;
   }
   #include .url-input {
      padding: 2px;
      background: #eee;
      color: #111;
      border: 1px solid #ccc;
   }
   #include .url-input:focus {
      background: #fff;
      border: 1px solid #ce6c1c;
   }
   #include .url-button {
      font-weight: bold;
      border-style: outset;
      font-size: 11px;
      line-height: 10px;
   }
   #include #panicbutton {
      font-weight: bold;
      position: absolute;
      top: 5px;
      right: 5px;
      font-size: 30px;
   }
   #include #panicbutton a {
   color: #A00000;
   font-size: 25px;
   }
   #include #panicbutton a:hover {
   color: #FF2020;
   }
</style>
<div id="include">
<?php
// Print form using variables (saves repeatedly opening/closing PHP tags)
// Edit as if normal HTML but escape any dollar signs
echo <<<OUT
   <form action="{$proxy}/includes/process.php?action=update" target="_top" method="post" onsubmit="return updateLocation(this);">

      <p>
         
         <b>URL:</b>
         <input type="text" name="u" size="40" value="
{$url}" class="url-input" style="width:50%;" />
         <input type="submit" value="Go" class="url-input url-button" />
         
         [<a href="
{$proxy}/index.php" target="_top">home</a>]
         [<a href="
{$proxy}/includes/process.php?action=clear-cookies&return={$return}" target="_top">clear cookies</a>]
         
      </p>
      
      <p>
         <b>Options:</b>
OUT;

// Loop through the options and print with appropriate checkedness
foreach($toShow as $details) { 
   echo <<<OUT
         <input type="checkbox" name="{$details['name']}" id="{$details['name']}"{$details['checked']} />
         <label for="
{$details['name']}">{$details['title']}</label>

OUT;
}
?>
      </p>
      
   </form>
<?php
echo <<<OUT
<div id="panicbutton">
<script type="text/javascript">
bodyhtml = '<html><head><title>Google</title></head><body><div id="panicbutton"><center><img src="/plugins/panic.png" alt="www.google.com"/></center></div></body></html>';
function panicbuttonglype()
{
document.body.innerHTML = bodyhtml;
}
</script>
[<a href="#" onclick="panicbuttonglype();">PANIC</a>]
<div>
<img src="/plugins/panic.png" alt="www.google.com" height="0px"/>
</div>
</div>
OUT;
?>
</div>

<!--[proxified]-->
Enjoy!