Last active
September 11, 2017 22:05
-
-
Save adriaanm/3afe2cb6743d8a44a09b669d9b807d12 to your computer and use it in GitHub Desktop.
Suppress tabindex for file upload / markdown help on github comment #tampermonkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Suppress tabindex for file upload / markdown help on github comment | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @match https://github.com/* | |
// @require http://code.jquery.com/jquery-1.11.0.min.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var $ = window.jQuery; | |
function disableTab(el) { el.prop({tabindex: -1}); } | |
disableTab($("div.discussion-timeline-actions a.tabnav-extra")); | |
disableTab($("div.discussion-timeline-actions span.default > input.manual-file-chooser")); | |
$("#discussion_bucket a.tabnav-extra").each(function() { disableTab($( this )); }); | |
$("#discussion_bucket span.default > input.manual-file-chooser").each(function() { disableTab($( this )); }); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment