TiddlyWiki: fix the SplashScreenPlugin (corrupting the Wiki alltogether)
The (very old and long abandoned) SplashScreenPlugin was written in a very hackish style, as it injected a <div> with the splash screen into the <head> tag. In those olde days when evil reigned, browsers just happily displayed such documents. But our new gem, Firefox Quantum, now "sanitises" such a malformed document by closing the Head right before the <div> and relocating the opening BODY tag to this place. Which then causes the TiddlyWiki self-modification routine to flounder, because the opening body tag is now in the middle of a "markup area", which is replaced by existing tiddler content (in this case the "MarkupPreHead" tiddler). So we end up without an opening Body tag, and this is what we save -- Resulting in a corrupted wiki! The obvious fix is to use the MarkupPreBody instead
This commit is contained in:
parent
b3bac8ee13
commit
a8429671c5
1 changed files with 15 additions and 10 deletions
|
|
@ -45,7 +45,6 @@ DAMAGE.
|
|||
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
|
||||
<!--}}}-->
|
||||
|
||||
<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;">loading <b>Proc-Layer</b> devel doku<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
|
||||
<!--PRE-HEAD-END-->
|
||||
<title> Engine - Building a Render Nodes Network from Objects in the Session </title>
|
||||
<style id="styleArea" type="text/css">
|
||||
|
|
@ -65,6 +64,8 @@ DAMAGE.
|
|||
<body onload="main();" onunload="if(window.unload) unload();">
|
||||
<!--PRE-BODY-START-->
|
||||
|
||||
<style type="text/css">#contentWrapper {display:none;}</style>
|
||||
<div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Serif; background-color:#eee;">loading <b>Lumiera</b> development notes ...<br/><br/><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>
|
||||
<!--PRE-BODY-END-->
|
||||
<div id="copyright">
|
||||
Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
|
||||
|
|
@ -4205,12 +4206,16 @@ This Design strives to achieve a StrongSeparation between the low-level Structur
|
|||
__10/2008__: the allocation mechanism can surely be improved later, but for now I am going for a simple implementation based on heap allocated objects owned by a vector or smart-ptrs. For each segment of the render nodes network, we have several families of objects, each of with will be maintained by a separate low-level memory manager (as said, for now implemented as vector of smart-ptrs). Together, they form an AllocationCluster; all objects contained in such a cluster will be destroyed together.
|
||||
</pre>
|
||||
</div>
|
||||
<div title="MarkupPreHead" modifier="Ichthyostega" created="200706172303" modified="200802030405">
|
||||
<div title="MarkupPreBody" modifier="Ichthyostega" created="201810200151" modified="201810200212" changecount="2">
|
||||
<pre>
|
||||
<style type="text/css">#contentWrapper {display:none;}</style>
|
||||
<div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Serif; background-color:#eee;">loading <b>Lumiera</b> development notes ...<br/><br/><span style="font-size: 14px; color:red;">Requires Javascript.</span></div></pre>
|
||||
</div>
|
||||
<div title="MarkupPreHead" modifier="Ichthyostega" created="200706172303" modified="201810200212" changecount="1">
|
||||
<pre><!--{{{-->
|
||||
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
|
||||
<!--}}}-->
|
||||
|
||||
<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;">loading <b>Proc-Layer</b> devel doku<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div></pre>
|
||||
</pre>
|
||||
</div>
|
||||
<div title="MediaAsset" modifier="Ichthyostega" created="200709021530" modified="201003140236" tags="def classes img">
|
||||
<pre>The Interface asset::Media is a //key abstraction// It ties together several concepts and enables to deal with them on the interfaces in a uniform manner. Besides, like every Asset kind, it belongs rather to the bookkeeping view: an asset::Media holds the specific properties and parametrisation of the media source it stands for. Regarding the __inward interface__ &mdash; as used from within the [[model|HighLevelModel]] or the [[render nodes|ProcNode]], it is irrelevant if any given asset::Media object stands for a complete media source, just a clip taken from this source or if a placeholder version of the real media source is used instead.
|
||||
|
|
@ -7279,7 +7284,7 @@ Shutdown is initiated by sending a message to the dispatcher loop. This causes t
|
|||
<div title="SplashScreen" modifier="just me" created="200706220430">
|
||||
<pre>{{red{killme}}}</pre>
|
||||
</div>
|
||||
<div title="SplashScreenPlugin" modifier="Saq" created="200607191631" modified="200607202048" tags="lewcidExtension systemConfig">
|
||||
<div title="SplashScreenPlugin" modifier="Ichthyostega" created="200607191631" modified="201810200148" tags="lewcidExtension systemConfig" changecount="1">
|
||||
<pre>/***
|
||||
|
||||
''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''
|
||||
|
|
@ -7323,14 +7328,14 @@ restart = function()
|
|||
}
|
||||
|
||||
|
||||
var oldText = store.getTiddlerText("MarkupPreHead");
|
||||
var oldText = store.getTiddlerText("MarkupPreBody") || '';
|
||||
if (oldText.indexOf("SplashScreen")==-1)
|
||||
{var siteTitle = store.getTiddlerText("SiteTitle");
|
||||
var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
|
||||
if (! store.tiddlerExists("MarkupPreHead"))
|
||||
{var myTiddler = store.createTiddler("MarkupPreHead");}
|
||||
if (! store.tiddlerExists("MarkupPreBody"))
|
||||
{var myTiddler = store.createTiddler("MarkupPreBody");}
|
||||
else
|
||||
{var myTiddler = store.getTiddler("MarkupPreHead");}
|
||||
{var myTiddler = store.getTiddler("MarkupPreBody");}
|
||||
myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
|
||||
store.setDirty(true);
|
||||
var splashScreenInstall = true;
|
||||
|
|
@ -10964,7 +10969,7 @@ merge(config.shadowTiddlers,{
|
|||
SiteUrl: "",
|
||||
SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options \u00bb" "Change TiddlyWiki advanced options">>',
|
||||
SideBarTabs: '<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>',
|
||||
TabMore: '<<tabs txtMoreTab "Missing" "Missing tiddlers" TabMoreMissing "Orphan" "Orphaned tiddlers" TabMoreOrphans "Shadowed" "Shadowed tiddlers" TabMoreShadowed>>'
|
||||
TabMore: '<<tabs txtMoreTab "Missing" "Missing tiddlers" TabMoreMissing "Orphan" "Orphaned tiddlers" TabMoreOrphans "Shadow" "Shadowed tiddlers" TabMoreShadowed>>'
|
||||
});
|
||||
|
||||
merge(config.annotations,{
|
||||
|
|
|
|||
Loading…
Reference in a new issue