Life In 19x19 http://www.lifein19x19.com/ |
|
Unhide everything button http://www.lifein19x19.com/viewtopic.php?f=14&t=3950 |
Page 1 of 1 |
Author: | Joaz Banbeck [ Wed Jun 01, 2011 10:02 am ] |
Post subject: | Unhide everything button |
When looking through threads with lots of hide tages - particularly Malkovich or problem threads - I find myself stopping to click so much that I often lose continuity. I'd like an option to 'read this thread with all hide/spoiler tags open'. |
Author: | xed_over [ Wed Jun 01, 2011 8:12 pm ] |
Post subject: | Re: Unhide everything button |
I've been asking for this for a long, long time. I really hate hide tags !! |
Author: | Jordus [ Thu Jun 02, 2011 8:54 pm ] |
Post subject: | Re: Unhide everything button |
This sounds like a good concept... I am just unsure if it is feasible... I'll have to look into it. Hopefully I will be able to dedicate some time to this kind of stuff now that school is out. |
Author: | Dusk Eagle [ Fri Jun 03, 2011 7:16 am ] |
Post subject: | Re: Unhide everything button |
This is definitely feasible, as I was working on a greasemonkey script last night to do it. I've already finished the javascript function to show/hide all text, the only part that was taking a while was learning how to use greasemonkey to add a link to the page to call the function. I should have it done tonight, unless Jordus gets this added to the site quicker. |
Author: | Jordus [ Fri Jun 03, 2011 3:48 pm ] |
Post subject: | Re: Unhide everything button |
I was going to try to look at it tonight, but seems like you beat me to it. Nice Job DuskEagle! ![]() |
Author: | Dusk Eagle [ Fri Jun 03, 2011 5:23 pm ] |
Post subject: | Re: Unhide everything button |
Well, getting it added to the main site is probably better long run, but my solution will work if you're using Firefox. 1) Install Greasemonkey. 2) Goto http://userscripts.org/scripts/show/104122 and click install. When you load a page, a link will appear on the top right of the page, next to the "Previous Topic | Next Topic" menu, to open all hide tags on a page. Clicking again will close all the hide tags on that page. The actual code for opening all hide tags is below, but it doesn't seem to work for Chrome (haven't tested on other browsers yet). I might look into making this code compatible with all browsers tomorrow if no else does first - then someone could just take it and easily add it to the site. Code: // Show/hide text within hide tags.
//Checks whether the first hide tag on a page is open or closed, and flips all hide tags to be the opposite of whatever state the first hide tag was in. function showhide() { var hidebuttons = document.getElementsByClassName('button2 btnlite'); if (hidebuttons[0].parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { for (i=0; i < hidebuttons.length; i++){ hidebuttons[i].parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; hidebuttons[i].innerText = ''; hidebuttons[i].value = 'Hide'; } } else { for (i=0; i < hidebuttons.length; i++){ hidebuttons[i].parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; hidebuttons[i].innerText = ''; hidebuttons[i].value = 'Show'; } } return void (0); } |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |