Help with Bookmarklet links

53 views
Skip to first unread message

TW Tones

unread,
Aug 13, 2020, 9:49:21 PM8/13/20
to TiddlyWiki
Folks,
If you place this in a tiddler, 

<a href="javascript:(function(){ $tw.saverHandler.numChanges = 0; $tw.saverHandler.updateDirtyStatus(); })();" > Reset Dirty </a>

Clicking on the resulting link will reset the dirty flag on a wiki, turning the red save wiki button grey.
  • This allows you to close the tab without the save prompt, or close you browser without that wiki insisting you save.
  • This link can ba dragged and dropped in your bookmarks, or Favourites and click from there will do the same for any tiddlywiki in your browsers current tab.
This is a bookmarklet, and I believe many more would prove useful to the community

However I have found the following problems
  • #1 How can I store the javascript in another tiddler or field and have a variable or text reference to embed in in the link?
    see here in this below;
<a href=here > Reset Dirty </a>

  • #2 I would like to do this also when the javascript includes quotes " and double quotes ""
  • #3 How can I somehow provide this bookmarklets in a Google Forum post?
    • Such they can be dragged and dropped to bookmarks/favourites?
Why?
  • I would like to share such bookmarkletts more freely
  • I would like to load some bookmarlets with a larger payload and want to store it seperatly
  • I want to build an easy to use bookmarklet tiddler
Thanks in advance for any possible suggestions

Regards
Tones
Reply all
Reply to author
Forward
0 new messages