HUGE Greasmemonkey security hole



TPMCafe Wide Columns IV


I've updated my TPMCafe Greasemonkey script.  You can install it by right-clicking  here.  Let me know your suggestions for new features, if the idea is feasible and I like it I might add it.

Features:

- Widens the center column
- Nests Comments
- Adds a link to the name of commentors that takes you to their user page. [NEW]
- Changes the 'Parent' link on comments to link to the existing comment on the current page instead of taking you to a new page [NEW]
- Fixes a TPMCafe bug were the comment ratings link takes you to the wrong page on subblogs such as yglesias.tpmcafe.com. [NEW]
- Gets rid of the <span> tags that show up in some comments [NEW]

TPMCafe wide columns III: Nested Comments


That's right, nested coments! 

I spent a lot of time figuring this out (I need a girlfriend), and it's probably a waste since Josh already said that they were going to do it, but here it is anyway.

Since it's gotten pretty long, I've put it up on a web server.  You should be able to right click on this link and click 'Install User Script'.

tpmcafewide.user.js

The reason it took me so long to write this is that I had to work around an apparent bug in the way comments are created by the CMS.  It should work but let me know if you see any weird nesting issues.

By the way, this will definetely not work as a bookmarklet on IE or any other browser, it uses some of the latest technologies that are only available in Firefox.

Also, thanks to our helpful webmaster, ubernostrum, for the .modsub tip and for putting up with this.

TPMCafe wide columns II


This script fixes the thin comments that I missed in the last script.

// tpmcafewide.user.js
// miguel vargas
// v0.2
//
// ==UserScript==
// @name          TPMCafe Wide
// @description   eliminate CSS fixed width on TPMCafe
// @include       http://*.tpmcafe.com/*
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle(
'#wrapper {width: auto!important;}' +
'#centercol {width: auto!important;}' +
'#header h1 {' +
'  margin-left: auto!important;' +
'  margin-right: auto!important;' +
'}' +
'#comments {' +
'  width: auto!important;' +
'  max-width: none!important;' +
'}' +
'#comments div {' +
'  width: auto!important;' +
'  max-width: none!important;' +
'}' +
'#comments p {' +
'  width: auto!important;' +
'  max-width: none!important;' +
'}' +
'#comments table {' +
'  width: auto!important;' +
'  max-width: none!important;' +
'}' +
'#comments form {' +
'  width: auto!important;' +
'  max-width: none!important;' +
'}' +
'#centercol form {' +
'  width: auto!important;' +
'}'
);

TPMCafe wide columns


If you don't like the thin columns on TPM Cafe and you know what Firefox's Greasemonkey is, then here you go.  If I stick around this website I might add more stuff, I was thinking of bigger text boxes and maybe even nested comments, as long as we've got the extra width.:

// tpmcafewide.user.js
// miguel vargas
// v0.1
//
// ==UserScript==
// @name          TPMCafe Wide
// @description   eliminate CSS fixed width on TPMCafe
// @include       http://*.tpmcafe.com/*
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle(
'#wrapper {width: auto!important;}' +
'#centercol {width: auto!important;}' +
'#header h1 {' +
'  margin-left: auto!important;' +
'  margin-right: auto!important;' +
'}');

miguel

user-pic

Following:
Followers:

Posts
Comments & Recommends


Favorites

All Reader Posts
How to use myTPM

Advertise Liberally
Share
Close Social Web Email

"To" Email Address

Your Name

Your Email Address