Skip to content

Commit

Permalink
Merge pull request #688 from modos189/link-direction-defaults
Browse files Browse the repository at this point in the history
Plugin link-show-direction: "Static near origin" by default
  • Loading branch information
modos189 authored Jan 23, 2024
2 parents 6314981 + b31fb41 commit ae34667
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions plugins/link-show-direction.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// @author jonatkins
// @name Direction of links on map
// @category Tweaks
// @version 0.2.2
// @version 0.2.3
// @description Show the direction of links on the map by adding short dashes to the line at the origin portal.

/* exported setup, changelog --eslint */

var changelog = [
{
version: '0.2.3',
changes: ['Default value for link show direction mode was set to Static near origin'],
},
{
version: '0.2.2',
changes: ['Version upgrade due to a change in the wrapper: added plugin icon'],
Expand Down Expand Up @@ -161,11 +165,12 @@ window.plugin.linkShowDirection.setup = function() {

addHook('linkAdded', function(data) { window.plugin.linkShowDirection.addLinkStyle(data.link); });

const default_mode = 'Static near origin';
try {
window.plugin.linkShowDirection.mode = localStorage['plugin-linkshowdirection-mode'];
} catch(e) {
window.plugin.linkShowDirection.mode = localStorage['plugin-linkshowdirection-mode'] || default_mode;
} catch (e) {
console.warn(e);
window.plugin.linkShowDirection.mode = 'Disabled';
window.plugin.linkShowDirection.mode = default_mode;
}

window.plugin.linkShowDirection.animateLinks();
Expand Down

0 comments on commit ae34667

Please sign in to comment.