Start adding support for permalinks

At this point we respect any permalink at startup, but we don’t yet
dynamically update the permalink, nor do we respond to ongoing
permalink changes.

The permalink separator being `%00` seems like it might be a bit
controversial. It buys us not having to wrap tiddler titles in double
square brackets if they contain spaces.

Another thing is that this scheme doesn’t support tiddler filters; the
plan is to support them like this:

http://tiddlywiki.com/#!Target%00%00[tag[task]sort[created]]
This commit is contained in:
Jermolene
2014-05-02 19:21:32 +01:00
parent cb914ae853
commit 327b53a641
5 changed files with 109 additions and 22 deletions
+9 -2
View File
@@ -1621,8 +1621,15 @@ readBrowserTiddlers: whether to read tiddlers from the HTML file we're executing
*/
$tw.boot.startup = function(options) {
options = options || {};
// Check for safe mode
$tw.safeMode = $tw.browser && location.hash === "#:safe";
// Get the URL hash and check for safe mode
$tw.locationHash = "#";
if($tw.browser) {
if(location.hash === "#:safe") {
$tw.safeMode = true;
} else {
$tw.locationHash = location.hash;
}
}
// Initialise some more $tw properties
$tw.utils.deepDefaults($tw,{
modules: { // Information about each module