User:Kuhlau/CopyTitle.js: Difference between revisions
ugh now i gotta adapt this for vector 2010 |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 18: | Line 18: | ||
#title-copy-content , | #title-copy-content , | ||
#title-copy-all { | #title-copy-all { | ||
color: var(--alt-link-color); | |||
color: var(--color | |||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
| Line 25: | Line 24: | ||
#title-copy-all:hover { | #title-copy-all:hover { | ||
text-decoration: underline; | text-decoration: underline; | ||
} | } | ||
`); | `); | ||
| Line 36: | Line 34: | ||
class: 'mw-list-item title-copy-button', | class: 'mw-list-item title-copy-button', | ||
text: 'Copy title' | text: 'Copy title' | ||
}).appendTo($('# | }).appendTo($('#mw-panel #p-navigation .vector-menu-content-list')); | ||
| Line 43: | Line 41: | ||
id: 'title-copy-all', | id: 'title-copy-all', | ||
class: 'mw-list-item title-copy-button', | class: 'mw-list-item title-copy-button', | ||
text: 'Copy title | text: 'Copy title (namespace)' | ||
}).appendTo($('# | }).appendTo($('#mw-panel #p-navigation .vector-menu-content-list')); | ||
} | } | ||
$('# | $('#mw-panel .vector-menu-content-list #title-copy-content').click(function() { | ||
copy(mw.config.get('wgTitle'), this); | copy(mw.config.get('wgTitle'), this); | ||
}); | }); | ||
$('# | $('#mw-panel .vector-menu-content-list #title-copy-all').click(function() { | ||
copy(mw.config.get('wgPageName').replace(/_/g, ' '), this); | copy(mw.config.get('wgPageName').replace(/_/g, ' '), this); | ||
}); | }); | ||