AMO View All Versions

Click addon icon to access version history quickly

  1. // ==UserScript==
  2. // @name AMO View All Versions
  3. // @namespace http://userscripts.org/users/256199
  4. // @author NightsoN
  5. // @description Click addon icon to access version history quickly
  6. // @include https://addons.mozilla.org/*/firefox/addon/*
  7. // @homepageURL https://greasyfork.org/scripts/33482
  8. // @version 1.0
  9. // ==/UserScript==
  10.  
  11. (function(){
  12. var id = document.getElementById("addon").getAttribute("data-id");
  13. var lang = document.getElementsByTagName("html")[0].getAttribute("lang");
  14. var href = "/" + lang + "/firefox/addon/" + id + "/versions";
  15. var img = document.getElementById("addon-icon");
  16. var a = document.createElement("a");
  17. a.setAttribute("title", "View All Versions");
  18. a.setAttribute("href", href);
  19. a.appendChild(img.parentNode.replaceChild(a, img ));
  20. })();