Ticket #607 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 3 years ago

add HREF to permaview command link for rapid bookmarking

Reported by: EricShulman Owned by: JeremyRuston
Priority: minor Milestone: 2.6.1
Component: core Version:
Severity: trivial Keywords:
Cc:

Description (last modified by EricShulman) (diff)

Automatically set the HREF for the 'permaview' sidebar command link so you can use the 'right click' context menu for faster, easier bookmarking. Note that this does not automatically set the permaview in the browser's current location URL... it just sets the HREF on the command link. You still have to click the link to apply the permaview.

config.macros.permaview.handler = function(place)
{
	var btn=createTiddlyButton(place,this.label,this.prompt,this.onClick);
	addEvent(btn,"mouseover",this.setHREF);
	addEvent(btn,"focus",this.setHREF);
};
config.macros.permaview.setHREF = function(event){
	var links = [];
	story.forEachTiddler(function(title,element) {
		links.push(String.encodeTiddlyLink(title));
	});
	var newURL=document.location.href;
	var hashPos=newURL.indexOf("#");
	if (hashPos!=-1) newURL=newURL.substr(0,hashPos);
	this.href=newURL+"#"+encodeURIComponent(links.join(" "));
}

Note: HREF is added both on 'mouseover' and 'focus' events to account for non-mouse interfaces that use keyboard navigation

This change has been sucessfully implemented as a TiddlyTools CoreTweak?.

See  http://www.TiddlyTools.com/#CoreTweaks

Change History

Changed 5 years ago by EricShulman

  • description modified (diff)

Changed 5 years ago by MartinBudden

  • milestone set to 2.5

Changed 4 years ago by FND

  • milestone changed from 2.5.1 to 2.5.2

Changed 4 years ago by FND

  • milestone changed from 2.5.3 to 2.5.4

Changed 3 years ago by FND

  • milestone changed from 2.6 to 2.6.1

Changed 3 years ago by MartinBudden

  • status changed from new to closed
  • resolution set to wontfix

Won't fix - left as a CoreTweak?.

Note: See TracTickets for help on using tickets.