141 images & cwebgame

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           141 images & cwebgame
// @description    让141 images和cwebgame的图片不再缩小显示
// @include        http://141hongkong.com/forum/*
// @include        http://bbs.cwebgame.com/thread*
// @include        http://nightlife141.com/*
// @author         congxz6688
// @grant          GM_addStyle
// @version 0.0.1.20140630035022
// @namespace https://greasyfork.org/scripts/166
// ==/UserScript==

var cssStyle = "";
cssStyle += ".pls {display:none  !important;}";
cssStyle += "p.mbn, DL.tattl.attm,.showhide {width:100%  !important;}";
cssStyle += ".showhide {width:905px !important; margin:0px -5px 0px -10px !important; }";
cssStyle += "img[id^='resize'] {max-width:1160px !important;}";
GM_addStyle(cssStyle);

var getAuthors=document.querySelectorAll('a.xw1:not(.xi2)');
var getpublish=document.querySelectorAll('[id^="authorposton"]');
if (window.location.href.indexOf("nightlife141.com")!=-1){
	var getAuthors=document.querySelectorAll('.pi>.authi');
	document.querySelector('#recommend_add').click();
}

if(getAuthors.length!=0){
	for(i=0;i<getAuthors.length;i++){
		getpublish[i].innerHTML="由 " + getAuthors[i].innerHTML.bold().fontcolor("blue") + " " + getpublish[i].innerHTML;
	}
}

var imas=document.querySelectorAll("IMG");
for(var i=0;i<imas.length;i++) {
	var file=imas[i].src;
	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) {
		imas[i].removeAttribute("onclick");
		imas[i].removeAttribute("onload");
		imas[i].style.height=null;
		imas[i].removeAttribute("height");
		imas[i].style.width=null;
		imas[i].removeAttribute("width");
		imas[i].removeAttribute("class");
		imas[i].id="resize"+i;
	}
}