ScrollTo_Y | Vivre

Autoscroll to set Y-position on specific Hosts

< Feedback on ScrollTo_Y | Vivre

Review: Good - script works

§
Posted: 2016-02-23

Fabulous replacement--even better than original!

Original script gave no acknowledgement of setting the y-position with the bookmarklet, I wouldn't know if the position was saved until I did a refresh or two, so I like both the Greasemonkey menu and the popup message!

VivreAuthor
§
Posted: 2016-02-23

Thank you DyNama

you are so kind and caring and it's wonderful to have meet you :smile:

I'd like to let you know that the setting of GM-variables and filling them also has a side effect that the stored information never gets removed. So if you had used the prior script on many pages they will all stay in that storage.
As this also applies to my version I already have on my ToDo-list to find the way how to clear them if wanted. ... if I'm successfull there'll be an update straight away.

greets ~ Vivre

§
Posted: 2016-02-23
Edited: 2016-02-23

Wouldn't that be amazing if i went to a website to find pages scrolling down again after years of the original script not working?!

VivreAuthor
§
Posted: 2016-02-24

Yes that could be fun to experience :smile:
Maybe you can remember one of the former places now that ScrollTo_Y has returned to you.

btw: I too experienced a fatal PC break-down two years ago loosing all my scripts (...) and am so happy to have found out now that my profile/scripts/... have been mirrored on userscripts-mirror.org too.

VivreAuthor
§
Posted: 2016-02-27

Hello DyNama,
I've updated ScrollTo_Y so that it now automatically removes all stored values whose scroll-amounts are set to '0' and so keep the settings rather clean.

And 'unfortunately' you won't experience any surpising scrolling on former visited pages with the new script, as set keys are bound to the scripts who set them.
That means that the 'ys'-key from the old script can only be read, cleared or deleted when useing the old script.
If you like to do that just give me a call.

§
Posted: 2016-02-28

Yes, I just might like to clear them all out and start over. Nothing worse than having it full of useless settings.

VivreAuthor
§
Posted: 2016-02-29
Edited: 2016-02-29

Hello DyNama, here's how you can remove all set values of a given script.

Note: it can't be done from outside and therefore needs to be included into the script to get processed.

For the following examples to run, two more entries have to be added to script-header:

// @grant GM_listValues
// @grant GM_deleteValue

A: paste this snippet at the begin of a script and it will inform you about possible set values and also shuffle through all of them and showing you the contains.
You can use this on any script without influencing it.
Useing this on the old ScrollToY you would find out how many old hosts are still in there :wink:

// ############# check if GM_setValues exist and show each key including its values
// place at begin of any script

if (GM_listValues() == "") {
  alert("This script has no set values.")
  } else  {
  alert("All keys set with this script: \n\n"+ GM_listValues())

  for each (var val in GM_listValues()) {
    alert("Set key: " + val +'\n\nSet Value: '+ GM_getValue(val));
  }
};
// ############# 

B: paste this snippet at the end of a script and it will remove all set values that the given script might have set.
Only use this on any script if you really want to remove all set values.
NOTE: if you just want to 'clean' the setting of any script for once, don't forget to remove or disable this snippet afterwards again, so that the newly set values don't get removed with every script-processing.

// ############# delete all GM_setValues from this script
// place at end of any script

for each (var val in GM_listValues()) {
  GM_deleteValue(val);
}

// just to varify that all values got removed:

if (GM_listValues() == "") {
  alert("This script has no set values.")
  } else  {
  alert("All keys set with this script: \n\n"+ GM_listValues())
};
// ############# 

C: if you can't be bothered with the above: to only remove the one set value from the old ScrollToY-script, paste the following line at the end of the script - run it once on any page and you should be fine.

GM_deleteValue('ys');

~ happy hacking ~ Vivre :smiley:

§
Posted: 2016-03-06

Done! Thanx a lot, Vivre!

§
Posted: 2016-05-30

I just wanted to add my appreciation here, Vivre! Now among my current favorite scripts! Thanks for the work.

Post reply

Sign in to post a reply.