Image viewer

Image viewer for Firefox

目前为 2016-04-06 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Image viewer
  3. // @namespace http://devs.forumvi.com/
  4. // @description Image viewer for Firefox
  5. // @version 1.0.4
  6. // @icon http://i.imgur.com/ItcjCPc.png
  7. // @author Zzbaivong
  8. // @noframes
  9. // @supportURL https://github.com/baivong/Userscript/issues
  10. // @run-at document-end
  11. // @grant GM_addStyle
  12. // ==/UserScript==
  13. (function () {
  14. var theme = 'light'; // dark|light
  15. var url;
  16. if (theme === 'light') {
  17. url = 'data:image/gif;base64,R0lGODlhCgAKAIAAAAAAAP///yH5BAEAAAAALAAAAAAKAAoAAAIRhB2ZhxoM3GMSykqd1VltzxQAOw==';
  18. } else {
  19. url = 'data:image/gif;base64,R0lGODlhCgAKAPAAACIiIgAAACH5BAHoAwEALAAAAAAKAAoAAAIRjA2Zhwoc3GMSykqd1VltzxQAOw==';
  20. }
  21. if (document.contentType.indexOf('image/') === 0) {
  22. GM_addStyle('body{background:url(' + url + ') repeat scroll rgba(0, 0, 0, 0.3);}body > img {background-color: transparent !important;}body > img:hover {background: rgba(0, 0, 0, 0.4) !important; outline: 3px solid #333;}');
  23. }
  24. }());