User talk:Alphax/20050809-01
From Wikipedia, the free encyclopedia
[edit] monobook.js
(Oops, darn that enter key.)
What I meant to ask before accidentally saving a blank message is: We talked about your monobook.js on IRC yesterday, and discussed me copying it to my monobook.js and adding a block feature to the list. However, I've been unsuccessful; every time I try to enter the feature, it doesn't work, and all the features your code is supposed to insert disappear. Since you seem to know something about this, could you tell me: What do I need to do to add the "block user" tags to user & user talk pages? -- Essjay · Talk 04:53, August 9, 2005 (UTC)
- I'll look into it on the Wikicities site I'm an admin at... try asking ABCD though. Alphax τεχ 07:33, 9 August 2005 (UTC)
I've now asked ABCD; I'll appreciate any help either of you can offer. Thanks! -- Essjay · Talk 07:42, August 9, 2005 (UTC)
- Um, I've got the "block" and "blocklog" tabs working - but the autofilling of the usernames doesn't seem to work for me. Does it work for ABCD? Alphax τεχ 08:15, 9 August 2005 (UTC)
-
- Well, it's kinda kludgy, but I've added:
function add_block_tab() { var c1 = document.getElementById('column-one'); var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; // use the "edit this page" tab to get already-tidied url var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href; // cut everything up to "title=" from the start and everything past "&action=edit" from the end editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit')); editlk = editlk.substring(editlk.indexOf(':') + 1); var slloc = editlk.indexOf('/'); if(slloc > 0) editlk = editlk.substring(0, slloc); // add "block" tab addlilink(tabs, '/wiki/Special:Blockip?faketarget=' + editlk, 'block', ''); // add "blocklog" tab addlilink(tabs, '/wiki/Special:Log/block?page=User:' + editlk, 'blocklog', ''); }
-
- and in morelinks():
if(document.title.indexOf('User:') == 0 || document.title.indexOf('User talk:') == 0) { add_block_tab(); }