Adapted for Dynalist. Could be done cleaner with a var = new regex instead of an IF-THEN but hey, it does what I need it to do
Usage: navigate to the document or list you want a tag index for. Expand/collapse what you want indexed or not. Click the bookmarklet. A list of tags will appear in the search box. Cut & paste it where you want.
How to install: make a bookmarklet anywhere, copy the below code, edit your bookmark, delete the URL in the bookmark and paste this code there instead
javascript:(function(){var separator=" | ";var URL=location.href;if(URL.indexOf('dynalist.io/d/')==-1){return;}if(URL.indexOf('#z=')==-1){qChar='#'}else{qChar='&'};if(URL.indexOf(qChar+'q=')==-1){location.href=URL+qChar+"q="+encodeURIComponent("# OR @");}var tags=document.getElementsByClassName("Node-children")[0].getElementsByClassName("node-tag");var TagIndex='';if(tags.length>0){var i;var tagList=[];for(i=0;i<tags.length;i++){tagList.push(tags[i].textContent.toLowerCase());}tagList.sort();var tagCount={};tagList.forEach(function(x){tagCount[x]=(tagCount[x]||0)+1;});for(var tagTitle in tagCount){TagIndex+=separator+tagTitle;}if(qChar=='#'){location.href=URL.replace(/\#\=.+/,"")+'#q='+encodeURIComponent(TagIndex.slice(separator.length))}else{location.href=URL.replace(/\&q\=.+/,"")+'&q='+encodeURIComponent(TagIndex.slice(separator.length))};}else{alert("NO TAGS TO INDEX!\n\nThis bookmarklet creates an index of your tags in the VISIBLE/EXPANDED part(s) of your document.\n\nINSTRUCTIONS:\nThe index is created in the search box. Select all the text in the search box, copy, press Esc to clear the search, then paste wherever. \n\nCUSTOMIZE THE TAG SEPARATOR\nEdit between the quotes:\nvar separator=\""+separator+"\"\nFor the highest density use a single space or a single colon.\n\nOriginal WorkFlowy bookmarklet by Rawbytez; adapted for Dynalist by Ruud\n");location.href=URL;}})();
Unfortunately, this isnât working for me. I was careful to paste in the script in its entirety, and use it on several expanded documents.
The document becomes blank, with the exception of the first Header, which remains on top. Iâve used some of Rawbytzâs scripts on Workflowy on iOS Safari, which have been wonderful.
Iâve never used this tool from workflowy before, so i had to look it up
So to my understanding, is this what it does?
Create the chrome bookmark with that value above as the URL address. I pasted the contents from Rawbytez below:
Search the specific list view of where you want to extract all childbulletpoint tags out (Even ones that are hidden)
Click the chrome bookmark
A list of all tags with a set of delimiters is made in the search bar
Copy the contents, paste, and now you have a tag cloud?
So this is kind of like evernoteâs tag pane system?
Basically, I can actually actively document and keep track of what tags I have made on any view of any document?
EDIT Okay I see now , it only works on visible items . Is there a way I can create a tag of everything Iâve made in a document, asides opening up every bulletpoints Iâve made to get to that list view (e.g. getting hidden child tags)
The bookmarklet tries to do this by searching for tag characters. The search string looks like this:
# OR @
This makes all tags visible in WorkFlowy. That search string doesnât seem to work the same way for me in DL, so yeah it looks like expanding everything is the only way.