It's not even Paradox related...
A while ago, IMDb added a stupid "Link this trivia" link after every single fucking trivia item. Needless to say I find this extremely annoying. If anyone has the knowledge, desire, and/or heart to write something simple that just hides the link (and maybe even the <hr> below it) for me, I could send you a simple "thank you" package in-game.
Thanks!
Can anyone write a simple Greasemonkey script for me?
Moderator: Public Forum Moderators
Can anyone write a simple Greasemonkey script for me?
"In the time of war, we would never have left a man stranded."Gobberwart wrote:Jupider is EXACTLY right.
"Maybe that's why we lost."
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Can anyone write a simple Greasemonkey script for me?
Should be pretty simple actually, just set the style on the "linksoda" class to "visibility: hidden" for anything on imdb.
While a greasemonkey script would be easy enough, but have you considered the Stylish Firefox extension? It lets you change the properties of any style on any page/site using a GUI. Check it out at https://addons.mozilla.org/en-US/firefox/addon/2108
For greasemonkey, something like this should probably work (not tested, might need some tweaking). Rather than setting the style, it just removes the element.
If you want to leave the element there but just hide it, change the "removeChild" line to
While a greasemonkey script would be easy enough, but have you considered the Stylish Firefox extension? It lets you change the properties of any style on any page/site using a GUI. Check it out at https://addons.mozilla.org/en-US/firefox/addon/2108
For greasemonkey, something like this should probably work (not tested, might need some tweaking). Rather than setting the style, it just removes the element.
Code: Select all
var allTriviaLinks = document.getElementsByClassName('linksoda');
var thisTriviaLink;
for (var i = 0; i < allTriviaLinks.length; i++) {
thisTriviaLink = allTriviaLinks[i];
thisTriviaLink.parent.removeChild(thisTriviaLink);
}
Code: Select all
thisTriviaLink.style.visibility = 'hidden';

Re: Can anyone write a simple Greasemonkey script for me?
The Greasemonkey thing worked, but I went ahead and got Stylish and I like it better, although, you said:
I did manage to find an existing IMDb Style that I like and added the functionality of removing the stated links, but I am having difficulty in figuring out how to remove the <hr>s from the trivia page (they would be in the "soda" class of the <div> on that page, so I'm trying to figure out the proper syntax.)
Where exactly is this GUI?? All I can seem to get is a cryptic "New style" window with "Name", "Tags", and a text box, presumably for the code.Stylish [...] lets you change the properties of any style on any page/site using a GUI.
I did manage to find an existing IMDb Style that I like and added the functionality of removing the stated links, but I am having difficulty in figuring out how to remove the <hr>s from the trivia page (they would be in the "soda" class of the <div> on that page, so I'm trying to figure out the proper syntax.)
Last edited by jupider on Sat May 08, 2010 12:21 pm, edited 1 time in total.
"In the time of war, we would never have left a man stranded."Gobberwart wrote:Jupider is EXACTLY right.
"Maybe that's why we lost."
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Can anyone write a simple Greasemonkey script for me?
Meh, ok so it's not that good of a GUIjupider wrote:Where exactly is this GUI?? All I can seem to get is a cryptic "New style" window with "Name", "Tags", and a text box, presumably for the code.

Code: Select all
@-moz-document domain("imdb.com") {
.linksoda {visibility:hidden}
}
