Skip to content

Commit

Permalink
Create screenshot-mode.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
insane210 committed Mar 21, 2015
1 parent e7a136e commit d076335
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions plugins/screenshot-mode.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// ==UserScript==
// @id iitc-plugin-screenshot-mode@insane210
// @name IITC plugin: Screenshot mode
// @category Misc
// @version 0.1.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Hide user interface
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
// @grant none
// ==/UserScript==

@@PLUGINSTART@@

// PLUGIN START ////////////////////////////////////////////////////////

// use own namespace for plugin
window.plugin.screenshotMode = function() {};

window.plugin.screenshotMode.hideUI = function () {
$('#chatcontrols').toggle();
$('#chat').toggle();
$('#chatinput').toggle();
$('#sidebartoggle').toggle();
$('#scrollwrapper').toggle();
$('#updatestatus').toggle();
$('#bkmrksTrigger').toggle();
$('#bookmarksBox').toggle();
$('#portal_highlight_select').toggle();
$('.leaflet-control-container').toggle();
}

var setup = function() {
document.addEventListener('keydown', function(e) {
// pressed alt+h
if (e.keyCode == 72 && !e.shiftKey && !e.ctrlKey && e.altKey && !e.metaKey) {
window.plugin.screenshotMode.hideUI();
}
}, false);
$('#toolbox').append(' <a onclick="window.plugin.screenshotMode.hideUI()" title="Hide UI">Hide UI</a>');
}

// PLUGIN END //////////////////////////////////////////////////////////

@@PLUGINEND@@

0 comments on commit d076335

Please sign in to comment.