Index: trunk/phase3/skins/common/rightclickedit.js |
— | — | @@ -1,46 +0,0 @@ |
2 | | -window.setupRightClickEdit = function() { |
3 | | - if (document.getElementsByTagName) { |
4 | | - var spans = document.getElementsByTagName('span'); |
5 | | - for (var i = 0; i < spans.length; i++) { |
6 | | - var el = spans[i]; |
7 | | - if(el.className == 'editsection') { |
8 | | - addRightClickEditHandler(el); |
9 | | - } |
10 | | - } |
11 | | - } |
12 | | -} |
13 | | - |
14 | | -window.addRightClickEditHandler = function(el) { |
15 | | - for (var i = 0; i < el.childNodes.length; i++) { |
16 | | - var link = el.childNodes[i]; |
17 | | - if (link.nodeType == 1 && link.nodeName.toLowerCase() == 'a') { |
18 | | - var editHref = link.getAttribute('href'); |
19 | | - // find the enclosing (parent) header |
20 | | - var prev = el.parentNode; |
21 | | - if (prev && prev.nodeType == 1 && |
22 | | - prev.nodeName.match(/^[Hh][1-6]$/)) { |
23 | | - prev.oncontextmenu = function(e) { |
24 | | - if (!e) { e = window.event; } |
25 | | - // e is now the event in all browsers |
26 | | - var targ; |
27 | | - if (e.target) { targ = e.target; } |
28 | | - else if (e.srcElement) { targ = e.srcElement; } |
29 | | - if (targ.nodeType == 3) { // defeat Safari bug |
30 | | - targ = targ.parentNode; |
31 | | - } |
32 | | - // targ is now the target element |
33 | | - |
34 | | - // We don't want to deprive the noble reader of a context menu |
35 | | - // for the section edit link, do we? (Might want to extend this |
36 | | - // to all <a>'s?) |
37 | | - if (targ.nodeName.toLowerCase() != 'a' |
38 | | - || targ.parentNode.className != 'editsection') { |
39 | | - document.location = editHref; |
40 | | - return false; |
41 | | - } |
42 | | - return true; |
43 | | - }; |
44 | | - } |
45 | | - } |
46 | | - } |
47 | | -} |
\ No newline at end of file |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -468,10 +468,6 @@ |
469 | 469 | 'scripts' => 'skins/common/protect.js', |
470 | 470 | 'dependencies' => 'mediawiki.legacy.wikibits', |
471 | 471 | ) ), |
472 | | - 'mediawiki.legacy.rightclickedit' => new ResourceLoaderFileModule( array( |
473 | | - 'scripts' => 'skins/common/rightclickedit.js', |
474 | | - 'dependencies' => 'mediawiki.legacy.wikibits', |
475 | | - ) ), |
476 | 472 | 'mediawiki.legacy.search' => new ResourceLoaderFileModule( array( |
477 | 473 | 'scripts' => 'skins/common/search.js', |
478 | 474 | 'styles' => 'skins/common/search.css', |