mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-06 02:41:21 +00:00
Linkable tabs
This commit is contained in:
parent
6ad16c9406
commit
bec50892de
1 changed files with 10 additions and 0 deletions
10
services/web/app/views/_scripts/active_tab.pug
Normal file
10
services/web/app/views/_scripts/active_tab.pug
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
script(type="text/javascript").
|
||||||
|
if (window.location.hash) {
|
||||||
|
setTimeout(function(){
|
||||||
|
tabID = window.location.hash.replace('#', '')
|
||||||
|
tab = document.getElementById(tabID)
|
||||||
|
if (tab && typeof(tab) != 'undefined' && tab != null) {
|
||||||
|
tab.setAttribute('active', true)
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
}
|
Loading…
Reference in a new issue