141 images & cwebgame

让141 images和cwebgame的图片不再缩小显示

  1. // ==UserScript==
  2. // @name 141 images & cwebgame
  3. // @description 让141 images和cwebgame的图片不再缩小显示
  4. // @include http://141hongkong.com/forum/*
  5. // @include http://bbs.cwebgame.com/thread*
  6. // @include http://nightlife141.com/*
  7. // @author congxz6688
  8. // @grant GM_addStyle
  9. // @version 0.0.1.20140630035022
  10. // @namespace https://greatest.deepsurf.us/scripts/166
  11. // ==/UserScript==
  12.  
  13. var cssStyle = "";
  14. cssStyle += ".pls {display:none !important;}";
  15. cssStyle += "p.mbn, DL.tattl.attm,.showhide {width:100% !important;}";
  16. cssStyle += ".showhide {width:905px !important; margin:0px -5px 0px -10px !important; }";
  17. cssStyle += "img[id^='resize'] {max-width:1160px !important;}";
  18. GM_addStyle(cssStyle);
  19.  
  20. var getAuthors=document.querySelectorAll('a.xw1:not(.xi2)');
  21. var getpublish=document.querySelectorAll('[id^="authorposton"]');
  22. if (window.location.href.indexOf("nightlife141.com")!=-1){
  23. var getAuthors=document.querySelectorAll('.pi>.authi');
  24. document.querySelector('#recommend_add').click();
  25. }
  26.  
  27. if(getAuthors.length!=0){
  28. for(i=0;i<getAuthors.length;i++){
  29. getpublish[i].innerHTML="由 " + getAuthors[i].innerHTML.bold().fontcolor("blue") + " " + getpublish[i].innerHTML;
  30. }
  31. }
  32.  
  33. var imas=document.querySelectorAll("IMG");
  34. for(var i=0;i<imas.length;i++) {
  35. var file=imas[i].src;
  36. if(((imas[i].id.indexOf("aimg_")!=-1||imas[i].id=="") && file.search(/uc_server\/data\/avatar/)==-1 && file.search(/center\.cwebgame\.com\/avatar/)==-1&& file.search(/uc_server\/images/)==-1 && file.search("/source/plugin/")==-1 && imas[i].parentNode.tagName!="A" ) ||file.search("/data/attachment/forum/")!=-1) {
  37. imas[i].removeAttribute("onclick");
  38. imas[i].removeAttribute("onload");
  39. imas[i].style.height=null;
  40. imas[i].removeAttribute("height");
  41. imas[i].style.width=null;
  42. imas[i].removeAttribute("width");
  43. imas[i].removeAttribute("class");
  44. imas[i].id="resize"+i;
  45. }
  46. }