Advertisement
metalx1000

Image Trend Rescue Bridge - Auto Fill - GreaseMonkey

Nov 15th, 2013
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Image Trend Rescue Bridge
  3. // @namespace   rescuebridge
  4. // @include     https://fl.rescuebridge.com/EastNaples/resource/intranet/runform/*
  5. // @version     1
  6. // @grant       none
  7. // @require       http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
  8. // ==/UserScript==
  9.  
  10.  
  11.  
  12. $("[name=Shifts]")[0].selectedIndex = localStorage.Shifts;
  13. $("[name=Alarms]")[0].selectedIndex = localStorage.Alarms;
  14. //$("[name=Station]").html('<option value="20">&nbsp;East Naples Station 20</option>');
  15. $("[name=Signature]")[0].selectedIndex = localStorage.Signature;
  16.  
  17. $("[name=Station]")[0].selectedIndex = localStorage.Station;
  18. $("#AuthPE_ID_2").val(localStorage.AuthPE_ID_2);
  19.  
  20. //Color inputs
  21. $("[name=Shifts]").css("border", "5px solid red");
  22. $("[name=Alarms]").css("border", "5px solid red");
  23. $("[name=Signature]").css("border", "5px solid red");
  24. $("[name=Station]").css("border", "5px solid red");
  25. $("#AuthPE_ID_2").css("border", "5px solid red");
  26.  
  27. $("body").append("<img src='http://icons.iconarchive.com/icons/mazenl77/I-like-buttons-3a/256/Perspective-Button-Stop-icon.png' id='enfdbtn' style='position:fixed;left:100px;top:100px;width:50;height:auto'>");
  28.  
  29. $("#enfdbtn").click(function(){
  30.  
  31.     var date = new Date();
  32.     dateString = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear().toString().substr(2,2);
  33.     fill_position($("[name=Signature]").val(),dateString);
  34. //$("[name=Station]").change();
  35.  
  36.     $("select").change(function(){
  37.         x=this.selectedIndex;
  38.         n=$(this).attr("name");
  39.         if(n=="Station"||n=="Alarms"||n=="Signature"||n=="Shifts"){
  40.             localStorage[n]=x;
  41.             localStorage.AuthPE_ID_2=this.val();
  42.         }
  43.     });
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement