From c48fa9723dded425137fb8280d22a09943645154 Mon Sep 17 00:00:00 2001
From: basilevs <basilevs@ngs.ru>
Date: Wed, 24 Aug 2016 07:52:48 +0200
Subject: [PATCH] Linux URL matching fixed

URL of timer depends on client OS

Issue #2
---
 TogglLibrary.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/TogglLibrary.js b/TogglLibrary.js
index 497aaca..09301de 100644
--- a/TogglLibrary.js
+++ b/TogglLibrary.js
@@ -233,9 +233,9 @@ function TogglButtonGM(selector, renderer) {
     }); 
   }
   
-  
+  const togglTimerUrl = /https:\/\/(?:www\.)toggl\.com\/app\/timer/;
   this.tryDecorateTimer = () => {
-    if (!window.location.href.startsWith("https://toggl.com/app/timer"))
+    if (!togglTimerUrl.test(window.location.href))
       return;
     GM_addStyle("li.entry div.paragon-decoration { width:3em; padding:16px; }");
     waitForElement(document, "#time-entry-list").then(timeEntryList => {
-- 
GitLab