mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-22 10:43:11 +00:00
Rename and add versioning to downloaded tiddlywiki core JS
* Rename "tiddlywiki5.js" to "twcore-VERSION.js" * Preload $:/config/SaveWikiButton/Template tiddler with the required external-js template value.
This commit is contained in:
parent
6cdc80085c
commit
dc41487079
@ -1,3 +1,3 @@
|
||||
title: $:/core/templates/load-external-js
|
||||
|
||||
<script src="<<coreURL>>" onerror="alert('Error: Cannot load tiddlywiki5.js');"></script>
|
||||
<script src="<<coreURL>>" onerror="alert('Error: Cannot load <<coreURL>>');"></script>
|
@ -4,5 +4,5 @@ title: $:/core/save/all-external-js
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
\end
|
||||
\define coreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js
|
||||
\define coreURL() %24%3A%2Fcore%2Ftemplates%2Ftwcore.js
|
||||
{{$:/core/templates/tiddlywiki5-external-js.html}}
|
||||
|
@ -4,5 +4,5 @@ title: $:/core/save/offline-external-js
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
\end
|
||||
\define coreURL() tiddlywiki5.js
|
||||
\define coreURL() twcore-$(version)$.js
|
||||
{{$:/core/templates/tiddlywiki5-external-js.html}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
title: $:/core/templates/tiddlywiki5.js
|
||||
title: $:/core/templates/twcore.js
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline codeinline
|
||||
|
||||
@ -10,6 +10,6 @@ title: $:/core/templates/tiddlywiki5.js
|
||||
<!--~~ Boot prefix ~~-->
|
||||
{{ $:/boot/bootprefix.js ||$:/core/templates/plain-text-tiddler}}
|
||||
<!--~~ Core plugin ~~-->
|
||||
{{$:/core/templates/tiddlywiki5.js/tiddlers}}
|
||||
{{$:/core/templates/twcore.js/tiddlers}}
|
||||
<!--~~ Boot kernel ~~-->
|
||||
{{ $:/boot/boot.js ||$:/core/templates/plain-text-tiddler}}
|
||||
|
@ -1,5 +1,9 @@
|
||||
title: $:/core/templates/tiddlywiki5.js/tiddlers
|
||||
title: $:/core/templates/twcore.js/tiddlers
|
||||
|
||||
`
|
||||
$tw.preloadTiddlerArray(`<$text text=<<jsontiddlers "[[$:/core]]">>/>`);
|
||||
$tw.preloadTiddlerArray([{
|
||||
title: "$:/config/SaveWikiButton/Template",
|
||||
text: "$:/core/save/offline-external-js"
|
||||
}]);
|
||||
`
|
||||
|
@ -1,3 +0,0 @@
|
||||
title: $:/config/SaveWikiButton/Template
|
||||
|
||||
$:/core/save/offline-external-js
|
Loading…
x
Reference in New Issue
Block a user