It is currently Thu May 01, 2025 8:06 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
Offline
 Post subject: Unhide everything button
Post #1 Posted: Wed Jun 01, 2011 10:02 am 
Judan
User avatar

Posts: 5546
Location: Banbeck Vale
Liked others: 1104
Was liked: 1457
Rank: 1D AGA
GD Posts: 1512
Kaya handle: Test
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'.

_________________
Help make L19 more organized. Make an index: https://lifein19x19.com/viewtopic.php?f=14&t=5207

Top
 Profile  
 
Offline
 Post subject: Re: Unhide everything button
Post #2 Posted: Wed Jun 01, 2011 8:12 pm 
Oza

Posts: 2264
Liked others: 1180
Was liked: 553
I've been asking for this for a long, long time.

I really hate hide tags !!

Top
 Profile  
 
Offline
 Post subject: Re: Unhide everything button
Post #3 Posted: Thu Jun 02, 2011 8:54 pm 
Site Admin
User avatar

Posts: 1125
Location: Allegan, MI, USA
Liked others: 18
Was liked: 121
Rank: KGS 9k
Universal go server handle: Jordus
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.

_________________
I'm thinking...

Top
 Profile  
 
Offline
 Post subject: Re: Unhide everything button
Post #4 Posted: Fri Jun 03, 2011 7:16 am 
Gosei
User avatar

Posts: 1758
Liked others: 378
Was liked: 375
Rank: 4d
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.

_________________
We don't know who we are; we don't know where we are.
Each of us woke up one moment and here we were in the darkness.
We're nameless things with no memory; no knowledge of what went before,
No understanding of what is now, no knowledge of what will be.


This post by Dusk Eagle was liked by 2 people: Chew Terr, Joaz Banbeck
Top
 Profile  
 
Offline
 Post subject: Re: Unhide everything button
Post #5 Posted: Fri Jun 03, 2011 3:48 pm 
Site Admin
User avatar

Posts: 1125
Location: Allegan, MI, USA
Liked others: 18
Was liked: 121
Rank: KGS 9k
Universal go server handle: Jordus
I was going to try to look at it tonight, but seems like you beat me to it. Nice Job DuskEagle! :tmbup:

_________________
I'm thinking...

Top
 Profile  
 
Offline
 Post subject: Re: Unhide everything button
Post #6 Posted: Fri Jun 03, 2011 5:23 pm 
Gosei
User avatar

Posts: 1758
Liked others: 378
Was liked: 375
Rank: 4d
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);
}

_________________
We don't know who we are; we don't know where we are.
Each of us woke up one moment and here we were in the darkness.
We're nameless things with no memory; no knowledge of what went before,
No understanding of what is now, no knowledge of what will be.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group