141 images & cwebgame

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Advertisement:

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Advertisement:

// ==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;
	}
}