+Chrysalides Posted June 3, 2010 Share Posted June 3, 2010 This has evolved from the version early in the year, when Groundspeak added some extra whitespace to the cache page. This version now : 1. Removes the extra line break between "Print" and the print choices 2. Removes the "1 is easiest, 5 is hardest" and the extra line break after that 3. Removes encryption key for ROT13 4. Removes disclaimer 5. Removes Facebook / I Like iframe 6. Removes L&F banner above log Each section is clearly labeled so that you can comment out parts you actually want (by adding "// " without the double quotes to the beginning of each code line for that section). http://userscripts.org/scripts/show/66749 Sample cache page, before and after (animated GIF) Link to comment
+ohmerfam Posted June 3, 2010 Share Posted June 3, 2010 NICE! i LIKE! Thanks for sharing!!! Link to comment
+StarBrand Posted June 3, 2010 Share Posted June 3, 2010 I really don't like removing elements of page that the website designers wanted us to see and know about. .... 'just me. Link to comment
+Avernar Posted June 3, 2010 Share Posted June 3, 2010 2. Removes the "1 is easiest, 5 is hardest" and the extra line break after that // (1 is easiest, 5 is hardest) & blank line after xpr = document.evaluate("//div[@id='yui-g']/table/tbody/tr/td/table/tbody/tr[3]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); if(xpr.singleNodeValue) xpr.singleNodeValue.style.display = "none"; xpr = document.evaluate("//div[@id='yui-g']/table/tbody/tr/td/br", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); if(xpr.singleNodeValue) xpr.singleNodeValue.style.display = "none"; Like this better? Link to comment
+rob3k Posted June 3, 2010 Share Posted June 3, 2010 This has evolved from the version early in the year, when Groundspeak added some extra whitespace to the cache page. This version now : 1. Removes the extra line break between "Print" and the print choices 2. Removes the "1 is easiest, 5 is hardest" and the extra line break after that 3. Removes encryption key for ROT13 4. Removes disclaimer 5. Removes Facebook / I Like iframe 6. Removes L&F banner above log rob3k likes this thread. Link to comment
+Chrysalides Posted June 3, 2010 Author Share Posted June 3, 2010 2. Removes the "1 is easiest, 5 is hardest" and the extra line break after that // (1 is easiest, 5 is hardest) & blank line after xpr = document.evaluate("//div[@id='yui-g']/table/tbody/tr/td/table/tbody/tr[3]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); if(xpr.singleNodeValue) xpr.singleNodeValue.style.display = "none"; xpr = document.evaluate("//div[@id='yui-g']/table/tbody/tr/td/br", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); if(xpr.singleNodeValue) xpr.singleNodeValue.style.display = "none"; Like this better? Oh yes Link to comment
tenrapid Posted June 3, 2010 Share Posted June 3, 2010 You could also give GC Tidy a try: http://userscripts.org/scripts/show/76387 Link to comment
+Avernar Posted June 3, 2010 Share Posted June 3, 2010 Oh yes XPath rules. The Firebug FireFox extension will show you the path of any node. Any you can go back up the tree with /.. which comes in handy. Link to comment
+Chrysalides Posted June 3, 2010 Author Share Posted June 3, 2010 You could also give GC Tidy a try: http://userscripts.org/scripts/show/76387 I will, thank you! Link to comment
+Lil Devil Posted June 3, 2010 Share Posted June 3, 2010 Sample cache page, before and after (animated GIF) Love the way you did that. Great idea! Link to comment
+hufuxx Posted June 3, 2010 Share Posted June 3, 2010 Hmm, really impressive what Greasemonkey can do. I wounder if it would be possible to remove the "Country+County column" and the "Visit Log"-column in the "Quick-View" of the profile page. ...are such things easy to program? Or is this harder to do? Best regards, Chris Link to comment
AZcachemeister Posted June 3, 2010 Share Posted June 3, 2010 I grabbed this script as soon as I saw it in the other thread. I still liked it! Since it IS configurable to each user's taste and needs, I don't think StarBrand should really have an issue with it... Link to comment
+dfx Posted June 3, 2010 Share Posted June 3, 2010 i just had to disable a bunch of GM scripts. the last site update broke a few of them, and some of them exhibited quite negative behavior and/or conflicted with other scripts. it made me wonder: isn't it a bad sign that people have to use GM scripts in the first place, sometimes for elementary things? i can see the point if it's for personally prefered things or maybe browser quirks, but for things that are obvious mistakes in the website? especially if it's an actively maintained website? Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 i just had to disable a bunch of GM scripts. the last site update broke a few of them, and some of them exhibited quite negative behavior and/or conflicted with other scripts. it made me wonder: isn't it a bad sign that people have to use GM scripts in the first place, sometimes for elementary things? i can see the point if it's for personally prefered things or maybe browser quirks, but for things that are obvious mistakes in the website? especially if it's an actively maintained website? Which GM script addresses an obvious mistake on the website? I do have one, by the way. Caches can have a hide date anywhere from 1900, but the earliest year you can select in the PQ is 1995. Link to comment
+simpjkee Posted June 4, 2010 Share Posted June 4, 2010 Each section is clearly labeled so that you can comment out parts you actually want (by adding "// " without the double quotes to the beginning of each code line for that section). This looks awesome. Thank you Chrys. I'm gonna use it. However, I would like to see the Facebook part. I can view the script a couple different ways and can see what you mean about putting in the "//" marks. I can't figure out how to edit it though. The one spot I see "edit" is when I go up to the toolbar and click tools/Greasemonkey/Manage User Scripts. Then a window opens up and it allows me to select the script and hit edit, but then it asks for a text editor and allows me to browse my computer for a text editor program. Do I have that already? Am I doing this wrong? What's going on? Link to comment
+dfx Posted June 4, 2010 Share Posted June 4, 2010 (edited) Which GM script addresses an obvious mistake on the website? well, i do consider too much whitespace (or generally things taking up too much space) to be an obvious mistake - a design mistake. but i think i should have said "shortcoming" instead of "mistake". it's little things: a quick jump-to-gc-code link on each page, the page remembering the tracking number you've entered to get to the trackable profile when you go to log it, pictures attached to logs/listings showing up as thumbnails, additional logs loading per ajax instead of having to reload the whole page, a clickable formatting/smiley bar for log entries, etc etc etc.. all those little things that make the site so much more usable, useful and convenient, and at the same time don't do any harm. why aren't they there by default? why doesn't GS just take all those little changes and incorprate them into the site itself? Edited June 4, 2010 by dfx Link to comment
+simpjkee Posted June 4, 2010 Share Posted June 4, 2010 Each section is clearly labeled so that you can comment out parts you actually want (by adding "// " without the double quotes to the beginning of each code line for that section). This looks awesome. Thank you Chrys. I'm gonna use it. However, I would like to see the Facebook part. I can view the script a couple different ways and can see what you mean about putting in the "//" marks. I can't figure out how to edit it though. The one spot I see "edit" is when I go up to the toolbar and click tools/Greasemonkey/Manage User Scripts. Then a window opens up and it allows me to select the script and hit edit, but then it asks for a text editor and allows me to browse my computer for a text editor program. Do I have that already? Am I doing this wrong? What's going on? Okay I figured it out. I downloaded TextPad for Windows and that did it. Link to comment
AZcachemeister Posted June 4, 2010 Share Posted June 4, 2010 Each section is clearly labeled so that you can comment out parts you actually want (by adding "// " without the double quotes to the beginning of each code line for that section). This looks awesome. Thank you Chrys. I'm gonna use it. However, I would like to see the Facebook part. I can view the script a couple different ways and can see what you mean about putting in the "//" marks. I can't figure out how to edit it though. The one spot I see "edit" is when I go up to the toolbar and click tools/Greasemonkey/Manage User Scripts. Then a window opens up and it allows me to select the script and hit edit, but then it asks for a text editor and allows me to browse my computer for a text editor program. Do I have that already? Am I doing this wrong? What's going on? Okay I figured it out. I downloaded TextPad for Windows and that did it. Geeze Josh! What kind of 'puter do you have? Notepad and Wordpad came standard on all of mine since WIN95! Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 why doesn't GS just take all those little changes and incorprate them into the site itself? The developers do occasionally incorporate some of the stuff done in a GM script into the site. One recent example : Prime Suspect's rot13 code that could decrypt a hint without reloading the page. Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 Okay I figured it out. I downloaded TextPad for Windows and that did it. Sorry for the slow response. Not sure why NotePad didn't work for you. By the way, for a free Windows text editor, I highly recommend Notepad++. For anyone else trying to edit the code, do the following: 1. Right click on Monkey Face at lower right of browser 2. Select "Manage User Script" 3. Select "nix white space" on the left column 4. Click on the "Edit" button at the bottom of the dialog box, under that left column. If it asks you to select an editor, try notepad or word (or Notepad++). Notepad will have a problem with Unix style line breaks. Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 Hmm, really impressive what Greasemonkey can do. I wounder if it would be possible to remove the "Country+County column" and the "Visit Log"-column in the "Quick-View" of the profile page. ...are such things easy to program? Or is this harder to do? With newly acquired Javascript kung-fu from Avernar : var tableCol; tableCol = document.evaluate( "//table[@class='Table']/tbody/tr/td[position() >= 4]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (i = 0; i < tableCol.snapshotLength; i++) { tableCol.snapshotItem(i).style.display = "none"; } Link to comment
+simpjkee Posted June 4, 2010 Share Posted June 4, 2010 Each section is clearly labeled so that you can comment out parts you actually want (by adding "// " without the double quotes to the beginning of each code line for that section). This looks awesome. Thank you Chrys. I'm gonna use it. However, I would like to see the Facebook part. I can view the script a couple different ways and can see what you mean about putting in the "//" marks. I can't figure out how to edit it though. The one spot I see "edit" is when I go up to the toolbar and click tools/Greasemonkey/Manage User Scripts. Then a window opens up and it allows me to select the script and hit edit, but then it asks for a text editor and allows me to browse my computer for a text editor program. Do I have that already? Am I doing this wrong? What's going on? Okay I figured it out. I downloaded TextPad for Windows and that did it. Geeze Josh! What kind of 'puter do you have? Notepad and Wordpad came standard on all of mine since WIN95! I was 'browsing' all over my computer looking for the notepad application but couldn't find where it was. I tried just opening the script in notepad, but that wasn't working. Then I figured it is was way easier to just download a new editor to desktop real quick. Link to comment
+Avernar Posted June 4, 2010 Share Posted June 4, 2010 With newly acquired Javascript kung-fu from Avernar : var tableCol; tableCol = document.evaluate( "//table[@class='Table']/tbody/tr/td[position() >= 4]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (i = 0; i < tableCol.snapshotLength; i++) { tableCol.snapshotItem(i).style.display = "none"; } You've done well, grasshopper. Link to comment
+Lil Devil Posted June 4, 2010 Share Posted June 4, 2010 With newly acquired Javascript kung-fu from Avernar : var tableCol; tableCol = document.evaluate( "//table[@class='Table']/tbody/tr/td[position() >= 4]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (i = 0; i < tableCol.snapshotLength; i++) { tableCol.snapshotItem(i).style.display = "none"; } Time for you to learn some CSS kung-fu. Only then may you have a chance to snatch the pebble out of my hand. GM_addStyle('table.Table td:nth-child(4), table.Table td:nth-child(5) { display:none; }'); Granted, some of this fancy selector stuff doesn't play well with some browsers, while the JavaScript is more universally compatible. The one I gave you yesterday is safe. Following is a safe way to get rid of the "Visit Log" column, but I can't think of a compatible way to get rid of the location column. GM_addStyle('td[a[title="Visit Log"]] { display:none; }'); Personally, I prefer to just force the "Visit Log" column to stop wrapping: GM_addStyle('a[title="Visit Log"] { white-space:nowrap; }'); Link to comment
+dfx Posted June 4, 2010 Share Posted June 4, 2010 The developers do occasionally incorporate some of the stuff done in a GM script into the site. One recent example : Prime Suspect's rot13 code that could decrypt a hint without reloading the page. actually the page used to do that, they just broke it at some point. only long time afterwards they fixed it and brought that function back. (unless the GM script existed before the page started doing it originally - i don't know about that.) Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 Time for you to learn some CSS kung-fu. Only then may you have a chance to snatch the pebble out of my hand. Many thanks from an unworthy disciple, great master! Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 The developers do occasionally incorporate some of the stuff done in a GM script into the site. One recent example : Prime Suspect's rot13 code that could decrypt a hint without reloading the page. actually the page used to do that, they just broke it at some point. only long time afterwards they fixed it and brought that function back. (unless the GM script existed before the page started doing it originally - i don't know about that.) You've been using the site longer than me, so that could be. I know that it has always required a reload to display hints when I started in late 2008. I know they broke Prime Suspect's Quick Hints after one update. I believe one of the site updates specifically mentioned incorporating GM scripts into the main site, and that was before the incorporation of Quick Hints. Link to comment
+lost! Posted June 4, 2010 Share Posted June 4, 2010 (edited) Nice script, no more white space!! Many thanks Is there a similar script for the white space infested "Your Profile" page? *edited* Just found it, sweet! Edited June 4, 2010 by lost! Link to comment
jholly Posted June 4, 2010 Share Posted June 4, 2010 Time for you to learn some CSS kung-fu. Only then may you have a chance to snatch the pebble out of my hand. Many thanks from an unworthy disciple, great master! Have you been updating your script with the snippets posted, or is that left as an exercise for the student? Link to comment
+Chrysalides Posted June 4, 2010 Author Share Posted June 4, 2010 Have you been updating your script with the snippets posted, or is that left as an exercise for the student? Since yesterday it's been updated to use the latest and greatest. I just updated it to get rid of the last part of the code where I walk through the elements (the extra BR between "Print" and the print choices). There's probably more places where I can use GM_addStyle() but I need to experiment more with that first. Link to comment
+Don_J Posted June 28, 2010 Share Posted June 28, 2010 Have you been updating your script with the snippets posted, or is that left as an exercise for the student? Since yesterday it's been updated to use the latest and greatest. I just updated it to get rid of the last part of the code where I walk through the elements (the extra BR between "Print" and the print choices). There's probably more places where I can use GM_addStyle() but I need to experiment more with that first. I know that I'm coming into this discussion long after it has ended, but I wanted to first thank you for your efforts and to also ask a question. I know the main point of the script is remove wasted space and remove portions of the page that a lot of us will never, ever use. Counter to that, can it be used to add a line of space between the coordinates and the "Other Conversions" link. It would be extremely beneficial to me if I could select the coordinates (to copy) by simply triple clicking on them. Currently, that also selects the line below it. Thanks Link to comment
+Chrysalides Posted June 28, 2010 Author Share Posted June 28, 2010 I know the main point of the script is remove wasted space and remove portions of the page that a lot of us will never, ever use. Counter to that, can it be used to add a line of space between the coordinates and the "Other Conversions" link. It would be extremely beneficial to me if I could select the coordinates (to copy) by simply triple clicking on them. Currently, that also selects the line below it. The easiest way of doing that is to hide "Other Conversion". Another thing that can be done is to move "Other Conversion" to the same line as the UTM coordinates (have to see what is displayed in other countries before I muck with that). I'll wait and see what other changes tomorrow will bring before I start modifying the script. The triple click sounds useful - if you don't hear from me by Wednesday feel free to email or PM me. Link to comment
jholly Posted June 29, 2010 Share Posted June 29, 2010 But since the red banner is back, the GM scripts might need work done on them. Link to comment
+Chrysalides Posted June 29, 2010 Author Share Posted June 29, 2010 But since the red banner is back, the GM scripts might need work done on them. Yeah. that's what I meant by "what other changes tomorrow will bring". At least my scripts are easy fixes, and my hope has always been that I won't need them after the next site update. Link to comment
jholly Posted June 29, 2010 Share Posted June 29, 2010 Yeah. that's what I meant by "what other changes tomorrow will bring". At least my scripts are easy fixes, and my hope has always been that I won't need them after the next site update. silly boy. Link to comment
+Chrysalides Posted June 29, 2010 Author Share Posted June 29, 2010 Yeah. that's what I meant by "what other changes tomorrow will bring". At least my scripts are easy fixes, and my hope has always been that I won't need them after the next site update. silly boy. I prefer to think of it as "innocent optimism" Link to comment
+Bear and Ragged Posted June 29, 2010 Share Posted June 29, 2010 Yeah. that's what I meant by "what other changes tomorrow will bring". At least my scripts are easy fixes, and my hope has always been that I won't need them after the next site update. silly boy. I prefer to think of it as "innocent optimism" Link to comment
knowschad Posted June 29, 2010 Share Posted June 29, 2010 Yeah. that's what I meant by "what other changes tomorrow will bring". At least my scripts are easy fixes, and my hope has always been that I won't need them after the next site update. silly boy. I prefer to think of it as "innocent optimism" Naive idealism. Link to comment
+Chrysalides Posted July 29, 2010 Author Share Posted July 29, 2010 Well, another site update, minor changes to the script. Thanks to jholly for letting me know it was broken. 1. Fixed L&F banner removal 2. Removed Facebook style change - no longer needed 3. Added request by Don_J to move "Other conversions" to UTM line so that coordinates can be selected using triple click. If you don't want (3), use the July 28 version (click on "Source Code" tab and select "Previous Versions") http://userscripts.org/scripts/show/66749 Link to comment
+Don_J Posted July 30, 2010 Share Posted July 30, 2010 Well, another site update, minor changes to the script. Thanks to jholly for letting me know it was broken. 1. Fixed L&F banner removal 2. Removed Facebook style change - no longer needed 3. Added request by Don_J to move "Other conversions" to UTM line so that coordinates can be selected using triple click. If you don't want (3), use the July 28 version (click on "Source Code" tab and select "Previous Versions") http://userscripts.org/scripts/show/66749 Thanks so much. When a new cache notification come out, I usually paste the coords into Goggle Earth. Selecting the coords from he cache page has always been problematic. Your script fixes this Thanks again. Link to comment
Recommended Posts