mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-06-06 00:29:12 +02:00
OcttKB Cross-Repo Sync (HTML to Raw)
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
title: $:/plugins/felixhayashi/hotzone/Configuration
|
||||
|
||||
Please see the [[GitHub page|https://github.com/felixhayashi/TW5-HotZone]] for more information on the options.
|
||||
|
||||
Save and reload the wiki to activate changes.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th align="left">Focus offset:</th>
|
||||
<td><$edit-text tiddler="$:/config/hotzone/focusOffset" tag="input" default="71px" /></td>
|
||||
</tr>
|
||||
</table>
|
@ -1,5 +0,0 @@
|
||||
title: $:/plugins/felixhayashi/hotzone/License
|
||||
|
||||
This code is released under the BSD license. For the exact terms visit:
|
||||
|
||||
https://github.com/felixhayashi/TW5-HotZone/blob/master/LICENSE
|
@ -1,3 +0,0 @@
|
||||
title: $:/plugins/felixhayashi/hotzone/Readme
|
||||
|
||||
Please visit the [[GitHub page|https://github.com/felixhayashi/TW5-HotZone]] for more information.
|
@ -1,10 +0,0 @@
|
||||
/*\
|
||||
|
||||
title: $:/plugins/felixhayashi/hotzone/config.js
|
||||
type: application/javascript
|
||||
module-type: library
|
||||
|
||||
@preserve
|
||||
|
||||
\*/
|
||||
(function(){"use strict";exports.config={classNames:{storyRiver:"tc-story-river",tiddlerFrame:"tc-tiddler-frame",tiddlerTitle:"tc-title"},references:{userConfig:"$:/config/hotzone/focusOffset",focussedTiddlerStore:"$:/temp/focussedTiddler"},checkbackTime:$tw.utils.getAnimationDuration()}})();
|
@ -1,3 +0,0 @@
|
||||
module-type: library
|
||||
title: $:/plugins/felixhayashi/hotzone/config.js
|
||||
type: application/javascript
|
@ -1,10 +0,0 @@
|
||||
/*\
|
||||
|
||||
title: $:/plugins/felixhayashi/hotzone/hotzone.js
|
||||
type: application/javascript
|
||||
module-type: startup
|
||||
|
||||
@preserve
|
||||
|
||||
\*/
|
||||
(function(){"use strict";exports.name="hotzone";exports.platforms=["browser"];exports.after=["story"];exports.synchronous=true;exports.startup=function(){var t=require("$:/plugins/felixhayashi/hotzone/config.js").config;var e=null;var i=document.getElementsByClassName(t.classNames.storyRiver)[0];var r=$tw.wiki.getTiddlerData(t.references.userConfig,{});var s=isNaN(parseInt(r.focusOffset))?150:parseInt(r.focusOffset);var a=function(e,i,r){if(!(e instanceof Element))return;if(!$tw.utils.hasClass(e,t.classNames.tiddlerFrame))return;var s=e.getElementsByClassName(t.classNames.tiddlerTitle)[0];if(s){var a=s.innerText||s.textContent;return a.trim()}};var n=function(e,i){$tw.wiki.addTiddler(new $tw.Tiddler({title:t.references.focussedTiddlerStore,text:e},$tw.wiki.getModificationFields()));if(i){var r=document.getElementsByClassName("hzone-focus")[0];if(r){$tw.utils.removeClass(r,"hzone-focus")}$tw.utils.addClass(i,"hzone-focus")}};var l=function(){var r=$tw.wiki.getTiddler("$:/StoryList");if(r&&r.fields.list.length){var l=null;var o=Number.MAX_VALUE;var f=i.children;var u=t.classNames.tiddlerFrame;for(var d=f.length;d--;){if($tw.utils.hasClass(f[d],u)){var c=f[d].getBoundingClientRect();var v=Math.min(Math.abs(s-c.top),Math.abs(s-c.bottom));if(v<o){l=f[d];o=v}}}var w=a(l);if(w!==e&&$tw.wiki.getTiddler(w)){e=w;n(e,l);return}}else if(e){e="";n(e)}};var o=function(t){var e;var i=false;return function(r,s){var a=this;if(i&&!s){}else{i=s;if(e!=null){clearTimeout(e)}e=setTimeout((function(){e=null;i=false;t.apply(a)}),r)}}};var f=o(l);var u=function(t){if(t["$:/HistoryList"]){if(!$tw.wiki.tiddlerExists("$:/HistoryList"))return;var e=$tw.wiki.getTiddler("$:/HistoryList").fields["current-tiddler"];var i=$tw.wiki.getTiddlerList("$:/StoryList");var r=i.indexOf(e)>=0;if(!r)return;f($tw.utils.getAnimationDuration()+10,true)}else if(t["$:/StoryList"]){f($tw.utils.getAnimationDuration()+10,true)}};var d=function(t){f(300,false)};$tw.wiki.addEventListener("change",u);window.addEventListener("scroll",d,false);d()}})();
|
@ -1,3 +0,0 @@
|
||||
module-type: startup
|
||||
title: $:/plugins/felixhayashi/hotzone/hotzone.js
|
||||
type: application/javascript
|
@ -1 +0,0 @@
|
||||
title: $:/temp/focussedTiddler
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"author": "Felix Küppers",
|
||||
"core-version": ">=5.1.5",
|
||||
"dependents": "",
|
||||
"description": "HotZone – Be notified when tiddlers are scrolled into view",
|
||||
"list": "Configuration License Readme",
|
||||
"plugin-type": "plugin",
|
||||
"released": "",
|
||||
"source": "https://github.com/felixhayashi/TW5-HotZone",
|
||||
"title": "$:/plugins/felixhayashi/hotzone",
|
||||
"version": "0.0.3",
|
||||
"name": "hotzone"
|
||||
}
|
Reference in New Issue
Block a user