MetaFilter Scroll Tag

By Plutor Last update Nov 3, 2012 — Installed 12,377 times.

Script Summary: Tracks your last-read comment in threads, and allows you to jump back to it easily. This script is known to work with Firefox/Greasemonkey, Opera, Chrome, and Safari.



As you read a thread, a little marker to the left of the comments should follow you. If you scroll back up, the marker will turn so it's pointing downwards, at which point you can click on it to return to (roughly) your last read comment. If you leave the thread and go back to the home page, the "(XX new)" comments link will now link you back to your last read comment. There will also be a new link on each thread in your Recent Activity page that says "XX since the last comment you read". If you don't like where the tag is in a thread, you can just drag it to a different comment.

Updates

25 Feb 2012: Take the cookie name into account when calculating cookie size limits – thanks again team lowkey

7 Dec 2011: Compress the data into a small number of cookies to prevent this bug. Thanks to team lowkey for Beta testing and very detailed bug reports.

16 Mar 2011: Small fix to make cookie storage last longer.

15 Mar 2011: DOM Storage sucks. Greasemonkey storage sucks. The only thing you can depend on is cookies.

27 Oct 2010: Use globalStorage instead of localStorage. "Recent Activity" numbers for non-blue threads were always wrong. Note: Firefox users (possibly others, haven't tested) will lose the location of ALL scroll tags in ALL threads when they upgrade to this version. Sorry.

19 Feb 2010: Improved Opera, Safari, and Chrome support. Helper scripts should no longer be necessary. Thanks to yaymukund for the push and for pointing me at localStorage.

License

This script is made available under the Simplified BSD license:

Copyright (c) 2009, Logan Ingalls
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.