Skip to content

Commit

Permalink
0.5.2 — fixed delay = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobibeer committed Jan 14, 2016
1 parent a63a34c commit bb42c39
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/tobibeer/preview/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/tobibeer/preview",
"description": "Shows a tiddler preview when hovering internal links",
"author": "Tobias Beer",
"version": "0.5.1",
"version": "0.5.2",
"core-version": ">=5.1.9",
"source": "https://github.com/tobibeer/tw5-preview",
"documentation": "https://tobibeer.github.io/tw5-preview",
Expand Down
2 changes: 1 addition & 1 deletion plugins/tobibeer/preview/startup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/tobibeer/preview",
"description": "Shows a tiddler preview when hovering internal links",
"author": "Tobias Beer",
"version": "0.5.1",
"version": "0.5.2",
"core-version": ">=5.1.9",
"source": "https://github.com/tobibeer/tw5-preview",
"documentation": "https://tobibeer.github.io/tw5-preview",
Expand Down
6 changes: 3 additions & 3 deletions src/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CoreLink.prototype.render = function() {
// Modifier keys to quick-show the popup w/o delay
keys = $tw.utils.parseKeyDescriptor(wiki.getTextReference(defaults+"keys","").toUpperCase()),
// Delay for popup rendering
delay = wiki.getTextReference(defaults+"delay","").toUpperCase(),
delay = wiki.getTextReference(defaults+"delay").toUpperCase(),
// Displays the preview popup
showPopup = function() {
// Get current popup level
Expand Down Expand Up @@ -104,7 +104,7 @@ CoreLink.prototype.render = function() {
return yes;
};
// Turn delay to integer
delay = delay ? parseInt(delay) : null;
delay = delay !== undefined ? parseInt(delay) : null;
// Not a number?
if(delay !== null && isNaN(delay)) {
// No delay
Expand Down Expand Up @@ -136,7 +136,7 @@ CoreLink.prototype.render = function() {
// Then show
showPopup();
// Modifiers don't match but we got a delay?
} else if(delay) {
} else if(delay !== null) {
// Set timeout and wait to show popup
wait = setTimeout(showPopup,delay);
// Remember timer at element
Expand Down

0 comments on commit bb42c39

Please sign in to comment.