mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-11-17 19:50:36 -05:00
Skip the stopwatch menu link update for users without one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5d3b2d959
commit
56081f8a01
1 file changed
+2
@@ -110,6 +110,8 @@ window.initStopwatch = function(config){
|
|||||||
},
|
},
|
||||||
setProjectId: function(projectId){
|
setProjectId: function(projectId){
|
||||||
var a = $('a#stopwatch-menu');
|
var a = $('a#stopwatch-menu');
|
||||||
|
// Users who can't log time have no stopwatch menu link
|
||||||
|
if (!a.length) return;
|
||||||
a.attr('href', a.attr('href').replace(/\/new.*$/, '/new?project_id='+projectId));
|
a.attr('href', a.attr('href').replace(/\/new.*$/, '/new?project_id='+projectId));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user