https://bugzilla.wikimedia.org/show_bug.cgi?id=27894

--- Comment #4 from Krinkle <[email protected]> 2011-05-16 21:21:54 UTC ---
(In reply to comment #3)
> Created attachment 8531 [details]
> proposed patch for this bug
> 
> Krinkle, I used the skin-independent mw.util.$content variable like you
> suggested. I removed the php-generated 'ondblclick' attribute to <body> and
> made a jQuery event listener. This solution works for me.

Hi Nik,

Thanks for your patch.

Two notes though:

1) document.location was originally a read-only property, although Gecko
browsers (like Firefox) allow you to assign to it as well. For cross-browser
safety, use window.location instead. [1]


2) Appending '&action=url' to the url is not safe and prone to error. The
following three urls are all examples of how MediaWiki can be configured that
are popular and supported:

- Using rewrite rules with wgArticlePath:
-- http://somewi.ki/wiki/Article

- Using rewrite rules and wgActionPaths:
-- http://somewi.ki/view/Article

- The default:
-- http://somewi.ki/w/index.php/Article

-- Full url (almost never used, but works)
- http://somewi.ki/w/index.php?title=Article

Appending '&action' only works for the last one. I suggest using the wgScript
mw.config variable ( mw.config.get( 'wgScript' ) ), and manually building a url
with the title (wgPageName) and action (edit) parameters.

--
Krinkle


[1] https://developer.mozilla.org/en/document.location#Notes

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to