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. // @match *
  9. // @include *
  10. // @noframes
  11. // @supportURL https://github.com/baivong/Userscript/issues
  12. // @run-at document-end
  13. // @grant GM_addStyle
  14. // ==/UserScript==
  15. (function () {
  16. var theme = 'light'; // dark|light
  17. var url;
  18. if (theme === 'light') {
  19. url = 'data:image/gif;base64,R0lGODlhCgAKAIAAAAAAAP///yH5BAEAAAAALAAAAAAKAAoAAAIRhB2ZhxoM3GMSykqd1VltzxQAOw==';
  20. } else {
  21. url = 'data:image/gif;base64,R0lGODlhCgAKAPAAACIiIgAAACH5BAHoAwEALAAAAAAKAAoAAAIRjA2Zhwoc3GMSykqd1VltzxQAOw==';
  22. }
  23. if (document.contentType.indexOf('image/') === 0) {
  24. 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;}');
  25. }
  26. }());