forked from NovemLinguae/UserScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTopicSubscriptionsTab.js
More file actions
42 lines (36 loc) · 1008 Bytes
/
Copy pathTopicSubscriptionsTab.js
File metadata and controls
42 lines (36 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// <nowiki>
/*
- Adds Watchlist tab and Topic Subscriptions tab to your watchlist and topic subscriptions pages.
*/
$(async function() {
// could also use mw.config.get('wgCanonicalSpecialPageName')
let title = mw.config.get('wgPageName'); // includes namespace, underscores instead of spaces
if ( title === 'Special:Watchlist' || title === 'Special:TopicSubscriptions' ) {
$('#mw-content-text').before(`
<style>
.TopicSubscriptionsTab {
}
.TopicSubscriptionsTab-Tab {
display: inline-block;
border-left: 1px solid black;
border-top: 1px solid black;
border-right: 1px solid black;
padding: 0 10px;
}
</style>
<div class="TopicSubscriptionsTab">
<div class="TopicSubscriptionsTab-Tab">
<a href="/wiki/Special:Watchlist">
Watchlist
</a>
</div>
<div class="TopicSubscriptionsTab-Tab">
<a href="/wiki/Special:TopicSubscriptions">
Topic Subscriptions
</a>
</div>
</div>
`);
}
});
// </nowiki>