Anonymous avatar Anonymous committed ae8dc59

Add the qa.mandriva.com script.

Comments (0)

Files changed (2)

t2/open-source/bits-and-bobs/greasemonkey/grease.html.wml

 this suffix.
 </p>
 
+<h2 id="qa-mandriva-fix-anchor"><a 
+href="qa.mandriva.com-fix-reply-to-anchor.user.js">Fix the qa.mandriva.com 
+reply-to-comment anchor</a></h2>
+
+<p>
+As of this writing, <a href="http://qa.mandriva.com/">the Mandriva Bugzilla
+(qa.mandriva.com)</a> has a bug where replying to a comment jumps to the first
+comment instead of the reply-to-box. (See 
+<a href="https://qa.mandriva.com/show_bug.cgi?id=50116">this 
+bug report about it</a>). This greasemonkey script fixes this problem.
+</p>
+
 <h2 id="o-and-m-title"><a href="ozy-millie-title.user.js">Ozy and Millie
 Title Generator</a></h2>
 

t2/open-source/bits-and-bobs/greasemonkey/qa.mandriva.com-fix-reply-to-anchor.user.js

+// ==UserScript==
+// @name         qa.mandriva.com-fix-reply-to-anchor
+// @version      0.0.1
+// @description  fix the reply-to-anchors on qa.mandriva.com.
+// @author       Shlomi Fish ( http://www.shlomifish.org/ )
+// @include      http://qa.mandriva.com/*
+// @include      https://qa.mandriva.com/*
+// ==/UserScript==
+// ===============================================================
+
+//
+// License is X11 License:
+// http://www.opensource.org/licenses/mit-license.php
+
+// Add jQuery
+var GM_JQ = document.createElement('script');
+GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
+GM_JQ.type = 'text/javascript';
+document.getElementsByTagName('head')[0].appendChild(GM_JQ);
+
+// Check if jQuery's loaded
+function GM_wait() {
+    if(typeof unsafeWindow.jQuery == 'undefined') {
+        window.setTimeout(GM_wait,100); 
+    }
+    else { 
+        $ = unsafeWindow.jQuery;
+        letsJQuery(); 
+    }
+}
+GM_wait();
+
+function fix_anchor() {
+    var myid = "add_comment";
+
+    $("a[name=\"" + myid + "\"]").remove();
+
+    $("td > textarea#comment").parent().attr("id", myid)
+}
+
+// All your GM code must be inside this function
+function letsJQuery() {
+    fix_anchor()
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.