TweakEngadget

By shellshock Last update Sep 21, 2010 — Installed 985 times.

There are 8 previous versions of this script.

// ==UserScript==
// @name        TweakEngadget
// @description Tweaks the appearance of the Engadget sites (Classic, Alt, HD & Mobile).
// @version	1.0
// @author      shellshock
// @namespace   http://userscripts.org/scripts/show/62584
// @attribution TheOtherJames (http://userscripts.org/scripts/show/62407)
// @include     http://*.engadget.*
// ==/UserScript==


// POST FONT PROPERTIES
var postFontFontfamily = "arial, helvetica, sans-serif";
var postFontSize = "10pt";
var postFontLineheight = "150%";


// SHOW PROPERTIES
var showSubheader = false;	// Show the Engadget subheader (aka Hero Bar)
var showTopStories = false;	// Show 'Top Stories' (frontpage)

var showFiledUnder = false;	// 'Filed under' line before the article title

var showFacebookLike = false;	// Facebook 'Like' button under the article
var showTags = false;	// Show Article tags
var showSphere = false;	// Before comments: Show Sphere-links

var showLinkarea = false;	// Bottom of the page: Show Linkarea 
var showFooter = false;	// Bottom of the page: Show Engadget footer-bar


// SIDEBAR PROPERTIES
var sidebar = true;	// Show/hide the whole sidebar

var sidebarAboutContact = false;
var sidebarArchives = false;
var sidebarAskEngadget = false;
var sidebarBlackHubModule = false;
var sidebarEditorsAtTwitter = false;
var sidebarEngadgetApps = false;
var sidebarFacebook = false;
var sidebarFeatContrib = true;
var sidebarGameChanger = false;
var sidebarKIRF = false;
var sidebarMostCommented = false;
var sidebarQuoted = false;
var sidebarRelatedArticles = true;
var sidebarScorecard = true;
var sidebarStats = false;



function tweakEngadget() {

	// POST FONT
	var css = ".post_body {font-family:"+ postFontFontfamily +"; font-size:"+ postFontSize +"; line-height:"+ postFontLineheight +"}";
		
	// SHOW ELEMENTS
	if (!showSubheader) {
		css += ".my-little-hero {display:none}";
		css += ".hero_bigheadline {display:none}";
		css += "#mid-hero {display:none}";
	}
	if (!showTopStories) { css += ".topstories {display:none}"; }
	if (!showFiledUnder) { css += ".filed_under {display:none}"; }
	if (!showSphere) { css += ".sphere {display:none}"; }
	if (!showFacebookLike){
		fblike = document.getElementsByTagName("fb:like");
		if (fblike.length > 0) {fblike[0].style.display = "none"; css += ".bar_clear_left {display:none}";}
	}	
	if (!showTags) { css += ".post_show_tags {display:none}"; }
	if (!showLinkarea) { css += ".linkarea {display:none}"; }
	if (!showFooter) { css += ".footer {display:none}"; }
	
	// SIDEBAR
	if (!sidebarAboutContact || !sidebar) { css += ".col2_about {display:none}"; }
	if (!sidebarArchives || !sidebar) { css += ".col2_archives {display:none}"; }
	if (!sidebarAskEngadget || !sidebar) { css += ".col2_ask_engadget {display:none}"; }
	if (!sidebarBlackHubModule || !sidebar) { css += ".hub-module {display:none}"; }
	if (!sidebarEditorsAtTwitter || !sidebar) { css += ".col2_featured_contributors {display:none}"; }
	if (!sidebarEngadgetApps || !sidebar) { css += ".eng-apps {display:none}"; }
	if (!sidebarFacebook || !sidebar) { css += "#fb_container {display:none}"; }
	if (!sidebarFeatContrib || !sidebar) { css += ".col2_featured_contributors {display:none}"; }
	if (!sidebarGameChanger || !sidebar) { css += ".col2_game_changer {display:none}"; }
	if (!sidebarKIRF || !sidebar) { css += ".col2_kirf {display:none}"; }
	if (!sidebarMostCommented || !sidebar) { css += ".col2_most_commented {display:none}"; }
	if (!sidebarQuoted || !sidebar) { css += ".col2_quoted {display:none}"; }
	if (!sidebarRelatedArticles || !sidebar) { css += ".related_articles {display:none}"; }
	if (!sidebarScorecard || !sidebar) { css += ".scorecard {display:none}"; }
	if (!sidebarStats || !sidebar) { css += ".col2_stats {display:none}"; }
	
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0)
	{
		var node = document.createElement("style");
		node.type = "text/css";
		node.appendChild(document.createTextNode(css));
		heads[0].appendChild(node); 
	}

};

tweakEngadget();