forked from IITC-CE/ingress-intel-total-conversion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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@@ |