This 15min Video is a quick demonstration, of a few of the techniques I use for my daily use of tiddlywiki. Not exactly a “how too” but a demo.
Please open in YouTube to see its full length of 14 mins.
This 15min Video is a quick demonstration, of a few of the techniques I use for my daily use of tiddlywiki. Not exactly a “how too” but a demo.
Please open in YouTube to see its full length of 14 mins.
Thank you, Anthony, for that video. I learned things!
Can you give an example of one of your bookmarklets, like VisitorV2? What is the URL content of that bookmarklet?
Visitorv2vbookmarklet simply applies a dozen or so tiddlers to the current wiki. It installs some macros, buttons and a set of visibility tiddlers that show buttons.
It contains the tool to make itself ie the visitorv2 bookmarklet so you could poke around and do it for yourself but that tool is not ready for general release.
To identify tiddlers to include you can create a list of recently changed tiddlers and review that list after applying various settings to your wiki.
I will see if I can share something in the next week.
Here is a tiddler containing the VisitorV2 plugin. Import to a wiki. VisitorV2.json (20.5 KB)
I have continued my journey of making use of, and developing features with Bookmarklets, and it is starting to bare substantial fruits. Thus I thought I would reopen this aptly named discussion.
Caution: Bookmarklets with tiddler payloads can install or replace tiddlers without regard to previous content. Like usual be careful, test and have backups.
Here are some related notes;
Visit This Bookmarklets in TiddlyWiki site to make use of tools and features including;
Perhaps one of the most common uses of Bookmarklets is applying settings or preferences to any wiki, including using two to toggle between two states (at least until some of the innovations I am working on are available).
Fluid story, fixed sidebar
or Fixed story, fluid sidebar
, set it to the value you want in your bookmarklet.Subsequent replies here will share more…
What is special about bookmarklet tiddlers?
If you create a bookmarklet tiddler you can export it and share it in the forum, but there is another quality to it;
Collaborators welcome!
A vero.
I do think your on-going bookmarklet thing is neat!
I kinda suspect it needs a few more end use cases to convince idiots like me?
Caro @TW_Tones, I just wonder HOW we can support this initiative to better ADD (make available) the mini-javascript-bookmarks-inter-fuels TW cherishes already?
Consistently. For an/ever…yone.
Just a comment.
Dimmi
TT
Just got around to asking ChatGPT to generate bookmarklets and it works better than I could imagine.
I now have after 15minutes work a bookmarklet that will set the current/tab or window name to the domain name, the file name is on file:// and to the last folder name if the filename was index.html and now an option to clear the window name is already set.
To paraphrase worf from start trek “Its a good time to be alive”
<a href="javascript:(function(){function getFilenameFromUrl(url){var path=new URL(url).pathname;return path.substring(path.lastIndexOf('/')+1);}function getLastFolderFromUrl(url){var path=new URL(url).pathname;var pathArray=path.split('/').filter(item=>item.length>0);return pathArray.length>1?pathArray[pathArray.length-2]:'';}if(window.name){if(confirm('Window name already set: '+window.name+'. Do you want to clear the window name?')){window.name='';alert('Window name cleared.');}else{alert('Window name not cleared.');}}else{var url=document.location.href;var isFileUrl=url.startsWith('file://');var identifier;if(isFileUrl){var filename=getFilenameFromUrl(url);identifier=(filename==='index.html')?getLastFolderFromUrl(url):filename;}else{identifier=document.location.hostname;}window.name=identifier;alert('Window name set to: '+identifier);}})();">Set or Clear Window Name</a>
Will talk.tiddlywiki honor the link? Set or Clear Window Name No it will not work directly from here.
Past the above code into a tiddler on any wiki and see the result.
[Edited] I have taken this a big step further and that is to maintain the list of named windows in local storage to keep window names unique. I am now trying to see if it can prompt for a window name to be entered if not unique. OMG :
Wonderful @TW_Tones
TW has this unique feature here! It allows to customize it using bookmarklet!
From security point of view, I am not sure this is good or not! @pmario may give us his opinion here!
But for personal use this is amazing! Like you I have a bookmarklet, it injects some of most common Plugins when I visit a web TiddlyWiki or when I have downloaded one and open locally!
Yes, I think we should evaluate this further but as long as one trusts the source of such bookmarklets, and they don’t miss represent themselves, that is, look like they are doing something they are not (spoofing) I think they are somewhat safe.
For personal use they are: “Must Have” ;-).
Code in bookmarklets is executed in context of the page. So it’s the same thing as using plugins. You need to trust the author. I personally will always want to read the content of the bookmarklet.
So I think the code from Bookmarklets, Just in Time install, Windows work flow and Timimi - #8 by TW_Tones should have been presented similar to the code below.
It’s human readable, which imo is important. Even if users do not fully understand, what’s going on, they can read it. If they are interested, they can look up the functions and see what they do and if they are secure for them. …
If they are not interested to look up the functions, they need to trust the author. … But at least the user has the choice.
<a href="javascript:
(function() {
function getFilenameFromUrl(url) {
var path = new URL(url).pathname;
return path.substring(path.lastIndexOf('/') + 1);
}
function getLastFolderFromUrl(url) {
var path = new URL(url).pathname;
var pathArray = path.split('/').filter(item => item.length > 0);
return pathArray.length > 1 ? pathArray[pathArray.length - 2] : '';
}
if (window.name) {
if (confirm('Window name already set: ' + window.name + '. Do you want to clear the window name?')) {
window.name = '';
alert('Window name cleared.');
} else {
alert('Window name not cleared.');
}
} else {
var url = document.location.href;
var isFileUrl = url.startsWith('file://');
var identifier;
if (isFileUrl) {
var filename = getFilenameFromUrl(url);
identifier = (filename === 'index.html') ? getLastFolderFromUrl(url) : filename;
} else {
identifier = document.location.hostname;
}
window.name = identifier;
alert('Window name set to: ' + identifier);
}
})();
">Set or Clear Window Name</a>
Hi @TW_Tones , I’ve been meaning to try your Bookmarklet solution for a while and now getting around to it. I’ve just been reading through your demo site and struggling to understand how I can create my own. The only way I can see shown is that within your site there are some toolbar buttons that I can drag places, but I would think your intent is that we (the user) can make changes in our own wiki and then save those changes into Bookmarklets of our own and apply at will. I’m sure it must be obvious but I’m not seeing how I do that. I would think you’d have the “builder mechanism” in a state where we can import / install in our own wikis or something.
@stobot I am preparing for a bush walk and will be out for some hours but so you can proceed.
https://bookmarklets.tiddlyhost.com/
These tools may be easy to package and share. See the packages tab but they may need effort to fully document for public consumption.