User talk:Supadawg/secedit.js

Latest comment: 11 years ago by Hgrosser in topic common.js

SecEdit is an inline section editor; in other words, you can edit sections of a Wikipedia article without going to a separate page. It also supports previewing and viewing changes inline.

To install and use:

  1. SecEdit is only tested on Firefox 1.5 and above, so you need it to continue. It may work on Safari and Opera, but I haven't tried it yet.
  2. Copy the following to your common.js:
    importScript('User:Supadawg/secedit.js');
  3. Clear your cache
  4. Go to a normal article and click on the [edit] link directly to the right of a section title. In a second or two, the normal editing box should appear, replacing the section text. Clicking Show preview or Show changes will cause the preview or changes to appear directly above the edit box. When you're done, click Save page as normal. The [edit] link has been replaced by [cancel], which will restore the previous text.
  5. Please share any comments or bugs on this page!

Bug found

edit

This script is failing for me on Wikipedia:Administrators' noticeboard and related pages. (I'm running Firefox 1.5.0.9 on WinXP, btw.) I'm pretty sure it's because the title has an apostrophe in it. Any chance of fixing it? Thanks for the wonderful script.  Anþony   talk  02:45, 27 December 2006 (UTC)Reply

Thanks, it's fixed now. If you clear your cache you should be able to edit the page. Supadawg (talk contribs) 20:55, 27 December 2006 (UTC)Reply

Hows this meant to work

edit
  1. How do I even use this
  2. Whats it meant to do? I copied the contents to my monobook.js, bypassed cache and theres no difference.

IE7. --Alfakim-- talk 19:04, 7 January 2007 (UTC)Reply

I really should add a description. First of all, it won't work for you, as you use Internet Explorer, and it's only tested in Firefox. If you had Firefox, you would go to a normal article, and click on one of the "edit" links of a section (directly to the right of the section title). The text of the section would be replaced by an edit box. It has the ability to preview, view changes, and, of course, cancel. Supadawg (talk contribs) 21:48, 7 January 2007 (UTC)Reply
Any chance of getting it to work in IE? Any different scripts you know of that do? --Alfakim-- talk 18:22, 8 January 2007 (UTC)Reply
Honestly, I don't currently have the time to work around every IE-specific bug, as well as fixing the differences between IE 6 and 7, which apparently are manifold (I have other projects). If there is enough demand for it, I could try it, though. You could try QuickEdit, but I'm not sure if that works in IE either, and it doesn't have "Preview" and "Show changes" options. However, you could always switch to a standards compliant browser ;) Supadawg (talk contribs) 00:51, 10 January 2007 (UTC)Reply

Safari 3

edit

Seems to work in Safari 3. Just so you know :D --TheDJ (talkcontribs) 20:03, 12 July 2007 (UTC)Reply

Bug

edit

I followed the instructions for installation, but whenever I click on a section edit link, the section sort of collapses, leaving only the title of the section. The edit box never appears. --DearPrudence 04:06, 12 August 2007 (UTC)Reply

The script seems to work in Firefox and Opera but not in IEAlex Smotrov 17:18, 15 August 2007 (UTC)Reply
I am using Firefox. --DearPrudence 06:06, 16 August 2007 (UTC)Reply

Question...

edit

How can I make this script work withwikEd? That is to say, How do I get the extra edit functions and buttons available when using this tool as none are there currently. Wikidudeman (talk) 16:46, 27 September 2007 (UTC)Reply

I don't think it's easy to do without Cacycle's support. —AlexSm 17:06, 17 March 2008 (UTC)Reply

script edits next section

edit

Somehow the script is editing the section 2 when I click the edit link for section 1... Any Idea why this is happening? Btw I am using the modern skin. Thanks for the great script! Waldir talk 16:44, 17 March 2008 (UTC)Reply

I think I can answer this one. The script is not designed properly, and is not compatible with zero section [edit] link, which you probably installed as a gadget. —AlexSm 17:06, 17 March 2008 (UTC)Reply
I guess I prefer the inline section editing to the zeroth section edit link =P If you eventually refactor the code so it is compatible, let me know ;) Waldir talk 03:43, 18 March 2008 (UTC)Reply
I made a quick change and created User:Nableezy/secedit.js which is this script with the small fix to work with section 0. All I had to do was change the url from
var editURI = "http://en.wikipedia.org/w/index.php?title="+encodeURIComponent2(pagetitleRe.exec(decodeURI(editSecs[i].childNodes[k].getAttribute("href")))[2]).replace(/\"/gi, "%22").replace(/\'/gi, "%27")+"&action=edit&section="+secCount;
var editURI = "http://en.wikipedia.org/w/index.php?title="+encodeURIComponent2(pagetitleRe.exec(decodeURI(editSecs[i].childNodes[k].getAttribute("href")))[2]).replace(/\"/gi, "%22").replace(/\'/gi, "%27")+"&action=edit&section="+(secCount-1);
feel free to use. Nableezy (talk) 01:41, 30 January 2009 (UTC)Reply
Just tried it, seems to work fine, but since I haven't been using the original script for a while, I'm left wondering, is it ok that the toolbar doesn't show up? Would it be possible to add it? --Waldir talk 20:48, 31 January 2009 (UTC)Reply
Thats going to take some thinking. Let me see what I can do. Nableezy (talk) 01:17, 2 February 2009 (UTC)Reply

Umm, right now it opens the next section whenever and wherever I click on edit... This started only a few days ago. --Illythr (talk) 22:35, 8 September 2008 (UTC)Reply

Hmm, seems to be a Firefox 3.0.0.1 problem... --Illythr (talk) 22:41, 8 September 2008 (UTC)Reply

Epiphany

edit

It does not seem to work with Epiphany (browser). NerdyNSK (talk) 19:20, 12 September 2008 (UTC)Reply

Does not work

edit

Script does not work. FF 3.5.9. I'm trying to use it here --Alex Blokha (talk) 11:14, 1 May 2010 (UTC)Reply

Works on Firefox 4

edit

This works on Firefox 4.0.1. Also, restart Firefox instead of just purging the page, otherwise it won't work. Samwb123T-C-E 23:05, 10 June 2011 (UTC)Reply

Chrome

edit

Works in Google Chrome. - Presidentman talk · contribs Random Picture of the Day (Talkback) 11:28, 2 August 2012 (UTC)Reply

wikEd/ProveIt

edit

Not compatible with wikEd or ProveIt. - Presidentman talk · contribs Random Picture of the Day (Talkback) 14:52, 2 August 2012 (UTC)Reply

common.js

edit

The code appears to work in the now default Vector skin as well as Monobook, so I have changed the link to monobook.js to common.js, which contains common code for all skins. If it doesn't work for some skins, please note this in the instructions, and perhaps change the link to skin.js, which will redirect to the code file for your skin. Hgrosser (talk) 22:52, 23 January 2013 (UTC)Reply