Wikipedia talk:WikiProject User scripts/Scripts/Edit Top
From Wikipedia, the free encyclopedia
I have a suggestion. Instead of all the f1r5tH34d1ng business, just change
document.getElementById("content").insertBefore(divContainer, theH1);
into:
document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]);
Thanks! JesseW 07:36, 29 August 2005 (UTC)
- I tried that before and it didn't work for some reason. It works for you? --pile0nadestalk | contribs 15:37, 29 August 2005 (UTC)
- Questions like this are why I created Wikipedia:WikiProject_User_scripts/Techniques - we can simplfy this down to a specifc line of code, then try it on lots of different browsers, and see how portable it is. Do you get any error messages(like on the JavaScript Console, maybe?) I will try my version, and see if it works, and post on the techniques page. Thanks! JesseW 20:51, 29 August 2005 (UTC)
- It works for me, with Firefox 1.0.4 on OSX. What are you using? JesseW 20:56, 29 August 2005 (UTC)
Contents |
[edit] Script does not work for historical page
Attempts at editing an older version will only summon the current version. Circeus 19:35, 24 June 2006 (UTC)
Similarly, I've had trouble where an article title with an ampersand (for example Madam & Eve) will try to edit the top section of Madam when I use the javascript edit top link. -- nae'blis 20:57, 2 August 2006 (UTC)
[edit] What am I missing?
I added the js to my user page, but it doesn't seem to be working. (No "edit" links for section 0.) I have dumped my cache a couple of times, and restarted the browser. I am probably doing something wrong, since I don't know js at all. Please see the page here: User:Pharillon/monobook.js Using Firefox 1.5.0.6 on Mac OS 10.4.
Advice appreciated. --Pharillon 07:28, 4 August 2006 (UTC)
- In your case, it looks like the }); might be missing from the end. Gimmetrow 04:08, 3 September 2006 (UTC)
[edit] Diff pages
An edit link for section0 appears on diff pages, currently. Gimmetrow 04:08, 3 September 2006 (UTC)
- Same here... shows up on history pages too. Carl Lindberg 04:21, 3 September 2006 (UTC)
[edit] redundant?
Why is
|| window.location.href.indexOf("/wiki/Special:") != -1
repeatedly added? One if-statement could replace that. Also, why isn't this an includable script file? I've mirrored the contents at Gerbrant.edit.top and will be editing it as I see fit. You might want to watch that page. Or not. Bye, Shinobu 20:51, 8 September 2006 (UTC)
[edit] Pages with lowercase first letter
Pages with lowercase first letter at Template:Lowercase, should all have a link to this project page so that they can change the first letter to look like lowercase. Obviously, someone that knows how to use the code should implement it and test it out on the pages. Big pages are: iPod, and eBay. 70.111.218.254 13:38, 14 October 2006 (UTC)
- I don't think it's a good idea to implement this as part of this module. It's better to start a seperate module. Maybe I'll have a go at it sometime. Shinobu 18:39, 27 October 2006 (UTC)
- If you place {{lowercase|title=news.admin.net-abuse.email}} on the top of the page it can change it to lowercase. --70.111.218.254 00:54, 4 December 2006 (UTC)
[edit] Doesn't work on Wikia.com
I noticed this doesn't work on Wikia.com. Would you like me to host a Wikia.com only version? I can't write it for you, but I can create the page as a subpage of Wikicities:User:Will Pittenger.
The problem:
URL created by the script: | http://starwars.wikia.com/w/index.php?title=User:Will_Pittenger/monobook.js&action=edit§ion=0 |
Sample URL for section | http://starwars.wikia.com/index.php?title=User:Will_Pittenger/monobook.js&action=edit§ion=1 |
Sample URL for page | http://starwars.wikia.com/index.php?title=User:Will_Pittenger/monobook.js&action=edit |