[Edited] State of play Javascript plugin to set the current window name - #11 by TW_Tones
Folks,
I can start my journey to write a javascript plugin but I thought I would first ask here;
- If possible a TiddlyWIki javascript dev could please write it for me
- or point to me to a Javascript tiddler with at least one parameter I could use as a template.
I would like to call a “VERY SIMPLE javascript macro” with one parameter “windowname” and have the javascript set the current window/tab using
window.name = '$windowname$'
$windowname$ to indicate the parameter value
Desired functionality;
- I understand this is the same as following a href with a target of $windowname$ but sets the current tab/window to that name, so following a subsequent link with a target="$windowname$" it will open in the same window/tab
Why?;
When using single file wikis, or local storage on a read only hosted wiki it, is desirable not to open the same file or site in multiple windows or tabs.
- It is a little awkward to ask a user to follow a link to a new window with a target set then get them to close the initial tab/window.
- It is possible to set the target in a bookmark in the local browser that honors the target that was set.
Futures;
- I wish to use both the window.name and target along with some cookies that will allow us to set a path to a local copy (or copies) of that site and be prompted to navigate to it from the internet published site.
- If at all possible if a macro could retrieve the existing window.name this would be helpful (I do not know if this is possible)
- I may also be able to make a smart bookmarklet (javascript) to smooth any workflows.
Thanks in advance for anything you can contribute.