diff --git a/yr.user.js b/yr.user.js index bcc4dd8..9551cbb 100644 --- a/yr.user.js +++ b/yr.user.js @@ -1,11 +1,13 @@ // ==UserScript== // @name YR Hotkeys // @namespace http://tampermonkey.net/ -// @version 1.0 +// @version 1.1 // @description Hotkeys 'alt+l', 'alt+r', or 'alt+v' for yr.no // @author Your Name // @match https://www.yr.no/* // @grant none +// @updateURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/yr.user.js +// @downloadURL https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/yr.user.js // ==/UserScript== (function() { @@ -44,6 +46,15 @@ } else if (event.key === 'v') { view = `forecast/daily-table`; } + } else if ($match[1] === 'nn') { + console.log("This is the Nynorsk site."); + if (event.key === 'l') { + view = `21-dagarsvarsel`; + } else if (event.key === 'r') { + view = `kart/radar`; + } else if (event.key === 'v') { + view = `vêrvarsel/dagleg-tabell`; + } } else { console.log("This is another language site."); }