Skip to content

Instantly share code, notes, and snippets.

@whispy
Last active January 11, 2018 16:26
Show Gist options
  • Select an option

  • Save whispy/e620cdedfb03e84e02945b3a0d928f62 to your computer and use it in GitHub Desktop.

Select an option

Save whispy/e620cdedfb03e84e02945b3a0d928f62 to your computer and use it in GitHub Desktop.
basecamp-keyboard-shortcuts.user.js
// ==UserScript==
// @name Basecamp - Keyboard Shortcuts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description This script adds some keyboard shortcuts to Basecamp.
// @updateURL https://gist.github.com/whispy/e620cdedfb03e84e02945b3a0d928f62/raw/basecamp-keyboard-shortcuts.user.js
// @downloadURL https://gist.github.com/whispy/e620cdedfb03e84e02945b3a0d928f62/raw/basecamp-keyboard-shortcuts.user.js
// @author Dan Berkowitz
// @match https://3.basecamp.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.1/mousetrap.min.js
// ==/UserScript==
function bulletList() {
var trix = document.querySelector("trix-editor");
var bulletedButton = document.querySelector('.trix-button--icon-bullet-list');
if (bulletedButton.hasAttribute('data-trix-active')) {
trix.editor.deactivateAttribute("bullet");
}
else {
trix.editor.activateAttribute("bullet");
}
}
window.onload = function() {
Mousetrap.bind(['ctrl+shift+.', function(e) {
console.log('pressed');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment