Easy To See - Greasy Fork Errors

Makes errors more visible

  1. // ==UserScript==
  2. // @name Easy To See - Greasy Fork Errors
  3. // @namespace http://www.diamonaddownload.weebly.com
  4. // @version 1.1
  5. // @description Makes errors more visible
  6. // @include *greasyfork.org/scripts/*/versions
  7. // @copyright 2014+, RGSoftware
  8. // @run-at document-body
  9. // @author R.F Geraci
  10. // @icon64 http://icons.iconarchive.com/icons/icons8/android/64/Food-Fork-icon.png
  11. // ==/UserScript==
  12.  
  13. //====CUSTOM====
  14.  
  15. var Interval = 250;
  16. var AmountOfFades = 6; //Choose only even numbers
  17. var FadeHighestOpacity = "100";
  18. var FadeLowestOpacity = "0";
  19.  
  20. var BoxColour = "#039CCC";
  21. var BoxPadding = "5px";
  22. var BoxMargin = "5px";
  23. var BoxBorder = "1px dashed black";
  24. var BoxBorderRadius = "2px";
  25. var BoxTransitionSpeed = "0.25s";
  26.  
  27. //Good idea to set the interval the same as the BoxTransitionSpeed
  28.  
  29. //==============
  30.  
  31.  
  32. window.onload = function(){
  33. var On = false;
  34. var Fcount = 0;
  35. var errors = document.getElementsByClassName('errors')[0];
  36. if (errors){
  37. errors.setAttribute('style', 'background: ' + BoxColour + ';'
  38. + ' padding: ' + BoxPadding + ';' + ' margin: ' + BoxMargin + ';' + ' border: '
  39. + BoxBorder + ';' + ' border-radius: ' + BoxBorderRadius + ';' + ' -webkit-transition: opacity '
  40. + BoxTransitionSpeed + ';' + ' opacity: 0');
  41. }
  42. function Animate(){
  43. On = !On;
  44. if (Fcount <= AmountOfFades){
  45. if (On){
  46. errors.style.opacity = FadeHighestOpacity;
  47. }else{
  48. errors.style.opacity = FadeLowestOpacity;
  49. }
  50. Fcount += 1;
  51. }
  52. }
  53. window.setInterval(Animate, Interval);
  54. };
  55.  
  56.