Skip to content

Instantly share code, notes, and snippets.

@adriaanm
Last active September 11, 2017 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriaanm/3afe2cb6743d8a44a09b669d9b807d12 to your computer and use it in GitHub Desktop.
Save adriaanm/3afe2cb6743d8a44a09b669d9b807d12 to your computer and use it in GitHub Desktop.
Suppress tabindex for file upload / markdown help on github comment #tampermonkey
// ==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