Penny Arcade Combine News and Comic

This puts the penny arcade comic on the news page.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Penny Arcade Combine News and Comic
// @namespace   http://userscripts.org/users/Scuzzball
// @include     http://penny-arcade.com/2*
// @version     1.0
// @description This puts the penny arcade comic on the news page.
// ==/UserScript==


var comicPage = document.location.protocol + "//" + document.location.hostname + "/comic" + document.location.pathname;

GM_xmlhttpRequest({
	method: "GET",
	url: comicPage,
	onload: function( response ) 
	{
		var patt = /\<div class\=\"post comic\"\>\n(.*)/;
		var comicURL = patt.exec(response.responseText);
		comicURL = comicURL[1];
		document.getElementById("heroFeature").innerHTML = comicURL;
		document.getElementById("heroFeature").style.background = "";
		document.getElementById("heroFeature").style.width = '800px';
		document.getElementById("heroFeature").style.height = '401px';
		document.getElementById("heroFeature").style.overflow="visible"
	}
});
document.getElementById("heroFeature").innerHTML = "";
document.getElementById("sidebar").style.display = 'none';