diff --git a/boot/boot.js b/boot/boot.js index 89fafce6a..9da1d7f60 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1542,6 +1542,8 @@ $tw.Wiki.prototype.processSafeMode = function() { this.addTiddler(new $tw.Tiddler({title: titleReportTiddler, text: report.join("\n\n")})); // Set $:/DefaultTiddlers to point to our report this.addTiddler(new $tw.Tiddler({title: "$:/DefaultTiddlers", text: "[[" + titleReportTiddler + "]]"})); + // Switch to the safe mode layout + this.addTiddler({title: "$:/layout", text: "$:/core/ui/SafeLayout"}); }; /* diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js index 734f6ae76..aad3f3c71 100644 --- a/core/modules/startup/story.js +++ b/core/modules/startup/story.js @@ -214,7 +214,7 @@ function updateLocationHash(options) { break; } // Only change the location hash if we must, thus avoiding unnecessary onhashchange events - if($tw.utils.getLocationHash() !== $tw.locationHash) { + if($tw.utils.getLocationHash() !== $tw.locationHash && !$tw.safeMode) { if(options.updateHistory === "yes") { // Assign the location hash so that history is updated window.location.hash = $tw.locationHash; diff --git a/core/ui/SafeModeLayout.tid b/core/ui/SafeModeLayout.tid new file mode 100644 index 000000000..af13cc9e3 --- /dev/null +++ b/core/ui/SafeModeLayout.tid @@ -0,0 +1,37 @@ +title: $:/core/ui/SafeLayout +tags: $:/tags/Layout +name: Safe Mode Layout +description: Safe Mode Layout +icon: $:/core/images/list + +\whitespace trim + +\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] + +\define tv-config-toolbar-class() tc-btn-invisible +\define tv-config-toolbar-icons() yes +\define tv-config-toolbar-text() no + +
+ +<$navigator story="$:/StoryList" history="$:/HistoryList"> + +

Layout

+ +{{$:/snippets/LayoutSwitcher}} + +

Controls

+ +
+<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]"> +<$transclude mode="inline"/> + +
+ +

Tiddlers

+ +<$transclude tiddler="$:/Manager" mode="block"/> + + + +
\ No newline at end of file