Merge branch 'upstream' into plugin
Conflicts: plugins/README.md
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
iitc-debug.user.js
|
||||
mobile/IngressIntelTC/bin
|
||||
|
46
NEWS.md
@ -1,5 +1,49 @@
|
||||
CHANGES IN 0.7
|
||||
==============
|
||||
|
||||
### General
|
||||
- from now on there will be [nightly builds](https://www.dropbox.com/sh/lt9p0s40kt3cs6m/3xzpyiVBnF) available. You need to manually update them if you want to stay on nightly. You should be offered to update to the next release version, though. Be sure to [have read the guide on how to report bugs](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#how-do-i-report-bugs) before using a nightly version.
|
||||
- IITC has [a shiny new user guide now](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/USERGUIDE.md). Please point new users to it, it should answer most of their questions and also teach them how to make good bug reports.
|
||||
|
||||
### Main Script
|
||||
- Feature: resonators for the selected portal are now highlighted (by Xelio)
|
||||
- Feature: resonator charge percentage shown in tooltip (by Xelio)
|
||||
- Feature: link to Google Maps for each portal (by vita10gy)
|
||||
- Change: Update wording for redeeming to match vanilla Ingress Intel.
|
||||
- Change: recommend Tampermonkey for Chrome users. It makes everything easier.
|
||||
- Change: portal image is now shrinked to fit in, instead of cut off
|
||||
- Change: use the same jQuery version as the vanilla Intel map.
|
||||
- Change: replaced native `alert` dialogs with own implementation. Should avoid overflowing or unaligned texts.
|
||||
- Bugfix: IITC would not display any portals/data for some people. **If you were affected by the “empty map” problem try the new version.**
|
||||
- Bugfix: selected portal would be unselected on certain conditions
|
||||
- Bugfix: portals were not clickable below the sidebar
|
||||
- Bugfix: map wasn’t rendered properly sometimes (only a gray area was shown)
|
||||
- Bugfix: resonators were duplicated sometimes
|
||||
- Bugfix: AP calulation was wrong
|
||||
- Bugfix: Permalink gave the wrong zoom level
|
||||
- Bugfix: zoom position not saved sometimes
|
||||
|
||||
### IITC Plugins
|
||||
|
||||
**New Plugins:**
|
||||
- Render limit increase for people with beefy hardware (by Jon Atkins)
|
||||
- Render resonators earlier (by Xelio)
|
||||
- Player tracker
|
||||
- compute AP stats for current view (by Hollow011)
|
||||
- show portal address in sidebar (by vita10gy)
|
||||
|
||||
**Updated:**
|
||||
- the guess players plugin now groups and sorts by level. It also remembers the players now, so zooming in won’t make a player “lower level”.
|
||||
|
||||
[You can obtain them in the plugins directory](https://github.com/breunigs/ingress-intel-total-conversion/tree/gh-pages/plugins#readme).
|
||||
|
||||
### IITC Mobile
|
||||
|
||||
An alpha quality **developer only** preview of IITC for mobile devices is available. [For more information see the guide in the mobile section](https://github.com/breunigs/ingress-intel-total-conversion/tree/gh-pages/mobile#readme).
|
||||
|
||||
|
||||
CHANGES IN 0.6 / 0.61
|
||||
=====================
|
||||
---------------------
|
||||
|
||||
0.6 had a broken link to style sheets. Fixed in 0.61.
|
||||
|
||||
|
@ -19,7 +19,7 @@ IITC can be [extended with the use of plugins](https://github.com/breunigs/ingre
|
||||
Install
|
||||
-------
|
||||
|
||||
Current version is 0.61. [See NEWS.md for details](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/NEWS.md) . **THIS VERSION CONTAINS A SECURITY UPDATE.** Please update as soon as possible and also alert friends about it.
|
||||
Current version is 0.7. [See NEWS.md for details](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/NEWS.md).
|
||||
|
||||
[**INSTALL**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js)
|
||||
|
||||
@ -30,7 +30,7 @@ Current version is 0.61. [See NEWS.md for details](https://github.com/breunigs/i
|
||||
- Confirm security question.
|
||||
- Reload page.
|
||||
|
||||
*NoScript:* The newest, not yet released version appears to work with NoScript. Until it is released disable NoScript if you have problems. To make the script work whitelist at least these domains: `ingress.com github.com leafletjs.com googleapis.com`. If you want to see the cool font also whitelist `googleusercontent.com`.
|
||||
*NoScript:* To make the script work whitelist at least these domains: `ingress.com github.com leafletjs.com googleapis.com`. If you want to see the cool font also whitelist `googleusercontent.com`.
|
||||
|
||||
### Chrome
|
||||
|
||||
@ -68,6 +68,7 @@ Please do!
|
||||
**So far, these people have contributed:**
|
||||
|
||||
[Bananeweizen](https://github.com/Bananeweizen),
|
||||
[blakjakau](https://github.com/blakjakau),
|
||||
[cmrn](https://github.com/cmrn),
|
||||
[epf](https://github.com/epf),
|
||||
[integ3r](https://github.com/integ3r),
|
||||
@ -80,6 +81,7 @@ Please do!
|
||||
[saithis](https://github.com/saithis),
|
||||
[Scrool](https://github.com/Scrool),
|
||||
[sorgo](https://github.com/sorgo),
|
||||
[tpenner](https://github.com/tpenner),
|
||||
[vita10gy](https://github.com/vita10gy),
|
||||
[Xelio](https://github.com/Xelio),
|
||||
[ZauberNerd](https://github.com/ZauberNerd)
|
||||
|
@ -32,7 +32,7 @@ The chat is split up into several categories. It usually only shows messages for
|
||||
|
||||
**The chat categories are:**
|
||||
- full: shows all automated messages *(23:57 \<apj\> destroyed an L3 Resonator on Two Spikes)*
|
||||
- compact: shows exactly one automated message per user
|
||||
- compact: shows only the latest automated message per user
|
||||
- public: shows user generated public messages (both Enlightenment and Resistance can read it)
|
||||
- faction: shows messages for own faction (e.g. only Resistance can read Resistance messages)
|
||||
|
||||
@ -101,7 +101,7 @@ Starting from the top, the sidebar shows this information:
|
||||
- Details about you, the logged in user. This is only updated if you reload the page. This is a limitation of Ingress, not IITC.
|
||||
- it shows your current level followed by your nick
|
||||
- to the right, it shows to percentages. The upper one, e.g. “XM: 37%” tells you how much your XM bar is filled. The lower one, e.g. “level: 37%“ tells you that you have gathered 37% of the AP required for the next level. It shows “max level” if you have reached max level.
|
||||
- the tooltip mainly shows you absolute numbers instead of percentages. It also shows how much invites you have.
|
||||
- the tooltip mainly shows you absolute numbers instead of percentages. It also shows how many invites you have.
|
||||
- The next bar is a visual representation of global MindUnits (MU) per faction. It is updated every now and then. The tooltip shows the absolute MU count per faction.
|
||||
- Search Location: You can search for continents, countries, cities or street addresses. If there is at least one result your are taken to the most likely immediately. There is no feedback if the entered location was not found. Rule of thumb: if it takes longer than three seconds, try again. [Read about supported formats in the user guide for this service](https://wiki.openstreetmap.org/wiki/Nominatim).
|
||||
|
||||
@ -123,7 +123,7 @@ Starting from the top, the sidebar shows this information:
|
||||
- links: shows incoming and outgoing links. The tooltip explains the icons.
|
||||
- reso dist: shows the average distance the resonators have to the portal.
|
||||
- fields: how many fields are connected to this portal
|
||||
- AP Gain: estimate of how much AP you gain if you take down this portal and deploy resonators of your own faction. Tooltip breaks this number down into parts.
|
||||
- AP Gain: estimate of how many AP you gain if you take down this portal and deploy resonators of your own faction. Tooltip breaks this number down into parts.
|
||||
|
||||
##### Resonators
|
||||
|
||||
|
@ -233,7 +233,8 @@ window.setupDialogs = function() {
|
||||
function boot() {
|
||||
window.debug.console.overwriteNativeIfRequired();
|
||||
|
||||
console.log('loading done, booting');
|
||||
console.log('loading done, booting. Built: ' + window.iitcBuildDate);
|
||||
if(window.deviceID) console.log('Your device ID: ' + window.deviceID);
|
||||
window.runOnSmartphonesBeforeBoot();
|
||||
|
||||
// overwrite default Leaflet Marker icon to be a neutral color
|
||||
|
@ -11,7 +11,7 @@
|
||||
//
|
||||
// Boot hook: booting is handled differently because IITC may not yet
|
||||
// be available. Have a look at the plugins in plugins/. All
|
||||
// code before “// PLUGIN START” and after “// PLUGIN END” os
|
||||
// code before “// PLUGIN START” and after “// PLUGIN END” is
|
||||
// required to successfully boot the plugin.
|
||||
//
|
||||
// Here’s more specific information about each event:
|
||||
@ -36,6 +36,16 @@
|
||||
// array [GUID, time, details]. Plugin can manipulate the
|
||||
// array to change order or add additional values to the
|
||||
// details of a portal.
|
||||
// beforePortalReRender: the callback argument is
|
||||
// {portal: ent[2], oldPortal : d, reRender : false}.
|
||||
// The callback needs to update the value of reRender to
|
||||
// true if the plugin has a reason to have the portal
|
||||
// redrawn. It is called early on in the
|
||||
// code/map_data.js#renderPortal as long as there was an
|
||||
// old portal for the guid.
|
||||
|
||||
|
||||
|
||||
|
||||
window._hooks = {}
|
||||
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated',
|
||||
|
@ -231,8 +231,16 @@ window.renderPortal = function(ent) {
|
||||
var old = findEntityInLeaflet(layerGroup, window.portals, ent[0]);
|
||||
if(old) {
|
||||
var oo = old.options;
|
||||
|
||||
// Default checks to see if a portal needs to be re-rendered
|
||||
var u = oo.team !== team;
|
||||
u = u || oo.level !== portalLevel;
|
||||
|
||||
// Allow plugins to add additional conditions as to when a portal gets re-rendered
|
||||
var hookData = {portal: ent[2], oldPortal: oo.details, reRender: false};
|
||||
runHooks('beforePortalReRender', hookData);
|
||||
u = u || hookData.reRender;
|
||||
|
||||
// nothing changed that requires re-rendering the portal.
|
||||
if(!u) {
|
||||
// let resos handle themselves if they need to be redrawn
|
||||
|
713
dist/style.0.7.css
vendored
Normal file
@ -0,0 +1,713 @@
|
||||
/* general rules ******************************************************/
|
||||
|
||||
html, body, #map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 14px;
|
||||
font-family: "coda",arial,helvetica,sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#scrollwrapper {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
right: -38px;
|
||||
top: 0;
|
||||
width: 340px;
|
||||
bottom: 45px;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
background-color: rgba(8, 48, 78, 0.9);
|
||||
border-left: 1px solid #20A8B1;
|
||||
color: #888;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
max-height: 100%;
|
||||
overflow-y:scroll;
|
||||
overflow-x:hidden;
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
#sidebartoggle {
|
||||
display: block;
|
||||
padding: 20px 5px;
|
||||
margin-top: -31px; /* -(toggle height / 2) */
|
||||
line-height: 10px;
|
||||
position: absolute;
|
||||
top: 340px; /* (sidebar height / 2) */
|
||||
z-index: 3001;
|
||||
background-color: rgba(8, 48, 78, 0.9);
|
||||
color: #FFCE00;
|
||||
border: 1px solid #20A8B1;
|
||||
border-right: none;
|
||||
border-radius: 5px 0 0 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.enl {
|
||||
color: #03fe03 !important;
|
||||
}
|
||||
|
||||
.res {
|
||||
color: #00c5ff !important;
|
||||
}
|
||||
|
||||
.none {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #ffce00;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* map display, required because GMaps uses a high z-index which is
|
||||
* normally above Leaflet’s vector pane */
|
||||
.leaflet-map-pane {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-overlays label.disabled {
|
||||
text-decoration: line-through;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.help {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
/* chat ***************************************************************/
|
||||
|
||||
#chatcontrols {
|
||||
color: #FFCE00;
|
||||
background: rgba(8, 48, 78, 0.9);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 3001;
|
||||
height: 26px;
|
||||
padding-left:1px;
|
||||
}
|
||||
|
||||
#chatcontrols.expand {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
#chatcontrols a {
|
||||
margin-left: -1px;
|
||||
display: inline-block;
|
||||
width: 94px;
|
||||
text-align: center;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
border: 1px solid #20A8B1;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#chatcontrols a:first-child {
|
||||
letter-spacing:-1px;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
#chatcontrols a.active {
|
||||
border-color: #FFCE00;
|
||||
border-bottom-width:0px;
|
||||
font-weight:bold
|
||||
}
|
||||
|
||||
#chatcontrols a.active + a {
|
||||
border-left-color: #FFCE00
|
||||
}
|
||||
|
||||
|
||||
#chatcontrols .toggle {
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
margin: 6px auto auto;
|
||||
}
|
||||
|
||||
#chatcontrols .expand {
|
||||
border-bottom: 10px solid #FFCE00;
|
||||
}
|
||||
|
||||
#chatcontrols .shrink {
|
||||
border-top: 10px solid #FFCE00;
|
||||
}
|
||||
|
||||
|
||||
#chat {
|
||||
position: absolute;
|
||||
width: 708px;
|
||||
bottom: 23px;
|
||||
left: 0;
|
||||
z-index: 3000;
|
||||
background: rgba(8, 48, 78, 0.9);
|
||||
font-size: 12.6px;
|
||||
color: #eee;
|
||||
border: 1px solid #20A8B1;
|
||||
border-bottom: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
em {
|
||||
color: red;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
#chat.expand {
|
||||
height:auto;
|
||||
top: 25px;
|
||||
}
|
||||
|
||||
#chatpublic, #chatfull, #chatcompact {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat > div {
|
||||
overflow-x:hidden;
|
||||
overflow-y:scroll;
|
||||
height: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 2px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#chat table, #chatinput table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-spacing: 0m;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#chatinput table {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#chat td, #chatinput td {
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 12.6px;
|
||||
vertical-align: top;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
/* time */
|
||||
#chat td:first-child, #chatinput td:first-child {
|
||||
width: 44px;
|
||||
overflow: hidden;
|
||||
padding-left: 2px;
|
||||
color: #bbb;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#chat time {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* nick */
|
||||
#chat td:nth-child(2), #chatinput td:nth-child(2) {
|
||||
width: 91px;
|
||||
overflow: hidden;
|
||||
padding-left: 2px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
mark {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.invisep {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow:hidden;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* divider */
|
||||
summary {
|
||||
color: #bbb;
|
||||
display: inline-block;
|
||||
font-family: Verdana,sans-serif;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
padding: 0 2px;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#chatinput {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 0 2px;
|
||||
background: rgba(8, 48, 78, 0.9);
|
||||
width: 708px;
|
||||
border: 1px solid #20A8B1;
|
||||
z-index: 3001;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#chatinput td {
|
||||
padding-bottom: 1px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
#chatinput input {
|
||||
background: transparent;
|
||||
font-size: 12.6px;
|
||||
font-family: Verdana,sans-serif;
|
||||
color: #EEEEEE;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* sidebar ************************************************************/
|
||||
|
||||
#sidebar > * {
|
||||
border-bottom: 1px solid #20A8B1;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#sidebartoggle .toggle {
|
||||
border-bottom: 10px solid transparent;
|
||||
border-top: 10px solid transparent;
|
||||
}
|
||||
|
||||
#sidebartoggle .open {
|
||||
border-right: 10px solid #FFCE00;
|
||||
}
|
||||
|
||||
#sidebartoggle .close {
|
||||
border-left: 10px solid #FFCE00;
|
||||
}
|
||||
|
||||
/* player stats */
|
||||
#playerstat {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #ffce00;
|
||||
font-size: 21px;
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
cursor:help;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h2 span {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: "~";
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
width: 205px;
|
||||
}
|
||||
|
||||
h2 div {
|
||||
float: right;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
h2 sup, h2 sub {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
|
||||
/* gamestats */
|
||||
#gamestat {
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#gamestat span {
|
||||
display: block;
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
cursor:help;
|
||||
height: 21px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
#gamestat .res {
|
||||
background: #005684;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#gamestat .enl {
|
||||
background: #017f01;
|
||||
}
|
||||
|
||||
|
||||
/* geosearch input, and others */
|
||||
input {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
color: #ffce00;
|
||||
height: 24px;
|
||||
padding:3px 4px 1px 4px;
|
||||
font-size: 14px;
|
||||
border:0;
|
||||
font-family:inherit;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
:-moz-placeholder {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
::-moz-placeholder {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
/* portal title and image */
|
||||
h3 {
|
||||
font-size: 17px;
|
||||
padding: 0 4px;
|
||||
margin:0;
|
||||
height: 25px;
|
||||
width: 100%;
|
||||
overflow:hidden;
|
||||
text-overflow: "~";
|
||||
white-space: nowrap;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.imgpreview {
|
||||
height: 200px;
|
||||
background: no-repeat center center;
|
||||
background-size: contain;
|
||||
cursor: help;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.imgpreview img.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#level {
|
||||
font-size: 40px;
|
||||
text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 0 5px #fff;
|
||||
display: block;
|
||||
margin-right: 15px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
/* portal mods */
|
||||
.mods {
|
||||
margin: 5px auto 1px auto;
|
||||
padding: 0 2px;
|
||||
width: 296px;
|
||||
height: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mods span {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
/* can’t use inline-block because Webkit’s implementation is buggy and
|
||||
* introduces additional margins in random cases. No clear necessary,
|
||||
* as that’s solved by setting height on .mods. */
|
||||
display: block;
|
||||
float:left;
|
||||
height: 63px;
|
||||
margin: 0 2px;
|
||||
overflow: hidden;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
width: 63px;
|
||||
cursor:help;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
.mods span:not([title]) {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
.res .mods span, .res .meter {
|
||||
border: 1px solid #0076b6;
|
||||
}
|
||||
.enl .mods span, .enl .meter {
|
||||
border: 1px solid #017f01;
|
||||
}
|
||||
|
||||
/* random details, resonator details */
|
||||
#randdetails, #resodetails {
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0 4px;
|
||||
table-layout: fixed;
|
||||
border-spacing: 0m;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#randdetails td, #resodetails td {
|
||||
overflow: hidden;
|
||||
text-overflow: "~";
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
width: 50%;
|
||||
width: calc(50% - 62px);
|
||||
}
|
||||
|
||||
#randdetails th, #resodetails th {
|
||||
font-weight: normal;
|
||||
text-align: right;
|
||||
width: 62px;
|
||||
padding-right:4px;
|
||||
padding-left:4px;
|
||||
}
|
||||
|
||||
#randdetails th + th, #resodetails th + th {
|
||||
text-align: left;
|
||||
padding-right: 4px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#randdetails td:first-child, #resodetails td:first-child {
|
||||
text-align: right;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
#randdetails td:last-child, #resodetails td:last-child {
|
||||
text-align: left;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
|
||||
#randdetails {
|
||||
margin-top: 9px;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
|
||||
#randdetails tt {
|
||||
font-family: inherit;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* resonators */
|
||||
#resodetails {
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.meter {
|
||||
background: #000;
|
||||
cursor: help;
|
||||
display: inline-block;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.meter span {
|
||||
display: block;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.meter-level {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
text-shadow: 0.0em 0.0em 0.3em #808080;
|
||||
}
|
||||
/* links below resos */
|
||||
|
||||
.linkdetails {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
aside {
|
||||
display: inline-block;
|
||||
padding-right: 9px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.linkdetails aside:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.linkdetails aside:nth-child(1) {
|
||||
text-align: right;
|
||||
width:88px;
|
||||
}
|
||||
|
||||
.linkdetails aside:nth-child(2) {
|
||||
text-align: right;
|
||||
width:67px;
|
||||
}
|
||||
|
||||
.linkdetails aside:nth-child(4) {
|
||||
margin-left:13px;
|
||||
}
|
||||
|
||||
#toolbox {
|
||||
padding: 4px 2px;
|
||||
font-size:90%;
|
||||
}
|
||||
|
||||
#toolbox > a {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
/* a common portal display takes this much space (prevents moving
|
||||
* content when first selecting a portal) */
|
||||
|
||||
#portaldetails {
|
||||
min-height: 553px;
|
||||
}
|
||||
|
||||
|
||||
/* update status */
|
||||
#updatestatus {
|
||||
background-color: rgba(8, 48, 78, 0.9);
|
||||
border-bottom: 0;
|
||||
border-top: 1px solid #20A8B1;
|
||||
border-left: 1px solid #20A8B1;
|
||||
bottom: 0;
|
||||
color: #ffce00;
|
||||
font-size:13px;
|
||||
padding: 4px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index:3002;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
/* preview */
|
||||
|
||||
#largepreview {
|
||||
left: 50%;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
z-index: 2000;
|
||||
}
|
||||
#largepreview img {
|
||||
box-shadow: 0 0 40px #000;
|
||||
}
|
||||
#largepreview img {
|
||||
border: 2px solid #f8ff5e;
|
||||
}
|
||||
|
||||
/* tooltips, dialogs */
|
||||
.ui-tooltip, .ui-dialog {
|
||||
max-width: 300px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
color: #222;
|
||||
font: 13px/15px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.ui-dialog {
|
||||
border: 1px solid #0F0F0F;
|
||||
padding: 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.ui-widget-overlay {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index:9998;
|
||||
background: #444;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.ui-dialog-titlebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-dialog-content {
|
||||
padding: 12px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
max-height: 600px !important;
|
||||
max-width: 700px !important;
|
||||
}
|
||||
|
||||
.ui-dialog-buttonpane {
|
||||
background: #F2F2F2;
|
||||
padding: 12px;
|
||||
border-top: 1px solid #E6E6E6;
|
||||
}
|
||||
|
||||
.ui-dialog-buttonset {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.ui-dialog-buttonset button {
|
||||
padding: 2px;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
td + td {
|
||||
padding-left: 4px;
|
||||
}
|
791
dist/total-conversion-build.user.js
vendored
4
main.js
@ -15,6 +15,8 @@
|
||||
if(document.getElementsByTagName('html')[0].getAttribute('itemscope') != null)
|
||||
throw('Ingress Intel Website is down, not a userscript issue.');
|
||||
|
||||
window.iitcBuildDate = '@@BUILDDATE@@';
|
||||
|
||||
// disable vanilla JS
|
||||
window.onload = function() {};
|
||||
|
||||
@ -52,7 +54,7 @@ for(var i = 0; i < d.length; i++) {
|
||||
var ir = window.internalResources || [];
|
||||
|
||||
var mainstyle = 'http://breunigs.github.com/ingress-intel-total-conversion/style.css?@@BUILDDATE@@';
|
||||
var smartphone = 'http://breunigs.github.com/ingress-intel-total-conversion/smartphone.css?@@BUILDDATE@@';
|
||||
var smartphone = 'http://breunigs.github.com/ingress-intel-total-conversion/mobile/smartphone.css?@@BUILDDATE@@';
|
||||
var leaflet = 'http://cdn.leafletjs.com/leaflet-0.5/leaflet.css';
|
||||
var coda = 'http://fonts.googleapis.com/css?family=Coda';
|
||||
|
||||
|
8
mobile/IngressIntelTC/.classpath
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
33
mobile/IngressIntelTC/.project
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>AppTemplate</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
35
mobile/IngressIntelTC/AndroidManifest.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.jakbox.ingressTC"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="14" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_GPS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:hardwareAccelerated="false"
|
||||
android:largeHeap="false"
|
||||
android:debuggable="true">
|
||||
<activity
|
||||
android:label="@string/app_name"
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
<intent-filter >
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
90
mobile/IngressIntelTC/assets/js/ingressSplash.html
Normal file
@ -0,0 +1,6 @@
|
||||
/** Automatically generated file. DO NOT MODIFY */
|
||||
package com.jakbox.ingressTC;
|
||||
|
||||
public final class BuildConfig {
|
||||
public final static boolean DEBUG = true;
|
||||
}
|
27
mobile/IngressIntelTC/gen/com/jakbox/ingressTC/R.java
Normal file
@ -0,0 +1,27 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package com.jakbox.ingressTC;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
}
|
||||
public static final class drawable {
|
||||
public static final int ic_launcher=0x7f020000;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int main=0x7f030000;
|
||||
}
|
||||
public static final class raw {
|
||||
public static final int loader=0x7f040000;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f050000;
|
||||
public static final int first_page=0x7f050001;
|
||||
public static final int jakboxBootLoader=0x7f050002;
|
||||
}
|
||||
}
|
40
mobile/IngressIntelTC/proguard.cfg
Normal file
@ -0,0 +1,40 @@
|
||||
-optimizationpasses 5
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-dontpreverify
|
||||
-verbose
|
||||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
|
||||
-keepclassmembers class * extends android.app.Activity {
|
||||
public void *(android.view.View);
|
||||
}
|
||||
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
11
mobile/IngressIntelTC/project.properties
Normal file
@ -0,0 +1,11 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-10
|
BIN
mobile/IngressIntelTC/res/drawable-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
mobile/IngressIntelTC/res/drawable-ldpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
mobile/IngressIntelTC/res/drawable-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 21 KiB |
10
mobile/IngressIntelTC/res/layout/main.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/first_page" />
|
||||
</LinearLayout>
|
13
mobile/IngressIntelTC/res/raw/loader.js
Normal file
@ -0,0 +1,13 @@
|
||||
function rebuildUI() {
|
||||
if(window.UIDone == true) { return; }
|
||||
if(!document.getElementById("map_canvas")) {
|
||||
setTimeout(rebuildUI, 50);
|
||||
return;
|
||||
} else {
|
||||
window.UIDone = true;
|
||||
}
|
||||
window.console.log(window.deviceID);
|
||||
window.loadJS("http://mathphys.fsk.uni-heidelberg.de:8000/test.js")
|
||||
//window.Android.TCReady();
|
||||
}
|
||||
rebuildUI();
|
17
mobile/IngressIntelTC/res/values/strings.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Ingress Intel Total Conversion</string>
|
||||
<string name="first_page">Connecting to Ingress Intel Map ... </string>
|
||||
<string name="jakboxBootLoader">
|
||||
bootLoader = function() {
|
||||
if(document.getElementById(\"map_canvas\")) {
|
||||
window.stop();
|
||||
document.body.innerHTML = "";
|
||||
} else {
|
||||
setTimeout(bootLoader, 50);
|
||||
}
|
||||
};
|
||||
setTimeout(bootLoader, 5);
|
||||
</string>
|
||||
|
||||
</resources>
|
149
mobile/IngressIntelTC/src/com/jakbox/ingressTC/MainActivity.java
Normal file
@ -0,0 +1,149 @@
|
||||
/********************************************************************************
|
||||
Ingress Intel Total Converion - Mobile & Tablet
|
||||
Android WebView wrapper/loader for iitc (ingress intel total conversion)
|
||||
iitc source @ https://github.com/breunigs/ingress-intel-total-conversion
|
||||
|
||||
Original Author: Jason Grima - jason@jakbox.net
|
||||
*********************************************************************************/
|
||||
|
||||
|
||||
package com.jakbox.ingressTC;
|
||||
|
||||
import android.app.*;
|
||||
import android.os.*;
|
||||
import android.content.Context;
|
||||
import android.view.*;
|
||||
import android.widget.*;
|
||||
import android.webkit.*;
|
||||
import android.provider.Settings.Secure;
|
||||
import android.util.Log;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.BufferedReader;
|
||||
import java.lang.StringBuffer;
|
||||
|
||||
public class MainActivity extends Activity
|
||||
{
|
||||
WebView web; // webview to hold the ingress site (and login etc)
|
||||
WebView splash; // splash screen, just a bit of pretty
|
||||
MyChrome chrome; // for logging, progress, etc
|
||||
MyClient client; // for controlling the webview's
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE); // hide the app title bar, Xeen requested
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// little animated title/splash page for IngressIntelTC
|
||||
// separate webview so we can be loading stuff in the background
|
||||
JSInterface js = new JSInterface(this, this); //js.setActivity(this);
|
||||
this.splash = new WebView(this);
|
||||
splash.getSettings().setJavaScriptEnabled(true); // because we use JS to trigger the CSS animation
|
||||
splash.getSettings().setAllowFileAccess(true); // because the splash page is store in the apk
|
||||
splash.getSettings().setAllowFileAccessFromFileURLs(true); // in case we add more scripts/images to the splash page
|
||||
splash.loadUrl("file:///android_asset/js/ingressSplash.html"); // there is is!
|
||||
splash.addJavascriptInterface(js, "android");
|
||||
setContentView(splash);
|
||||
// righto, load the the website (ingress.com/intel) with a bunch of permissions that may/or not be needed
|
||||
this.web = new WebView(this);
|
||||
this.client = new MyClient();
|
||||
web.setWebViewClient(this.client);
|
||||
web.getSettings().setJavaScriptEnabled(true);
|
||||
web.getSettings().setGeolocationEnabled(true);
|
||||
web.getSettings().setAllowFileAccess(true);
|
||||
web.getSettings().setAllowFileAccessFromFileURLs(true);
|
||||
web.getSettings().setDatabaseEnabled(true);
|
||||
web.getSettings().setDomStorageEnabled(true);
|
||||
web.getSettings().setGeolocationEnabled(true);
|
||||
|
||||
this.chrome = new MyChrome(); // the chrome let's us get console and progress feedback from the page
|
||||
web.setWebChromeClient(this.chrome);
|
||||
web.addJavascriptInterface(js, "android"); // ready to go
|
||||
|
||||
}
|
||||
|
||||
public void onRestoreInstanceState(Bundle state) {
|
||||
this.splash.restoreState(state);
|
||||
this.web.restoreState(state);
|
||||
}
|
||||
public void onSaveInstanceState(Bundle state) {
|
||||
this.splash.saveState(state);
|
||||
this.web.saveState(state);
|
||||
}
|
||||
|
||||
public void showWeb() { setContentView(web); splash.destroy(); Log.d("com.jakbox.ingressTC", "Flipping to web/ingress view"); }
|
||||
public void showSplash() { setContentView(splash); web.destroy(); Log.d("com.jakbox.ingressTC", "Flipping to splash/loading"); }
|
||||
|
||||
final class JSInterface {
|
||||
Context context; MainActivity act;
|
||||
public JSInterface (Context c, MainActivity a) { this.context = c; this.act = a; }
|
||||
public void setActivity(MainActivity a) { this.act = a; }
|
||||
// the @JavascriptInterface is needed for 4.2 devices to access this
|
||||
@JavascriptInterface
|
||||
public void pageReady(int ready) {
|
||||
if(ready != 0) {
|
||||
// the loader reports we're good to go, switch to ingress webview
|
||||
this.act.runOnUiThread(new Runnable() {
|
||||
public void run() { showWeb(); }
|
||||
});
|
||||
} else {
|
||||
// the loader reports we're not ready, switch to splash page
|
||||
this.act.runOnUiThread(new Runnable() {
|
||||
public void run() { showSplash(); }
|
||||
});
|
||||
}
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void loadBehind(final String url) {
|
||||
this.act.runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
Log.d("com.jakbox.ingressTC", "Loading (Ingress?) website in back webview");
|
||||
web.loadUrl(url); /* push the url to the webview */ }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private class MyClient extends WebViewClient {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView web, String Url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView web, String Url) {
|
||||
// here we conditionally load some external javascript
|
||||
Log.d("com.jakbox.ingressTC", "Page loading, injecting IITC JS");
|
||||
if(web.getUrl().contains("ingress.com/intel")) {
|
||||
// if NOT ingress, we may have been redirected to the google auth/login page
|
||||
web.loadUrl("javascript: window.stop(); ");
|
||||
// first stop the page from loading too much
|
||||
web.loadUrl("javascript: window.deviceID='"+Secure.getString(getContentResolver(), Secure.ANDROID_ID)+"'; ");
|
||||
// create a JS loader on the page
|
||||
web.loadUrl("javascript: if(!window.loadJS) { window.loadJS = function(scr) { var s = document.createElement('script'); s.src = scr+(scr.indexOf('file:///')==-1?'?ts="+System.currentTimeMillis()+"':''); s.type = 'text/javascript'; s.async = true; var st = document.getElementsByTagName('script')[0]; st.parentNode.insertBefore(s, st); } };");
|
||||
// actually hijack the page... if it's the right page... let the loader deal with that
|
||||
// should pull this loader into a local resource, maybe...
|
||||
// running it from the web for now ...
|
||||
web.loadUrl("javascript: if(!window.hijacked) { window.loadJS('http://mathphys.fsk.uni-heidelberg.de:8000/bootstrap.js'); window.hijacked = true;}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class MyChrome extends WebChromeClient {
|
||||
@Override
|
||||
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
|
||||
// Always grant permission since the app itself requires location
|
||||
// permission and the user has therefore already granted it
|
||||
callback.invoke(origin, true, false);
|
||||
}
|
||||
|
||||
public boolean onConsoleMessage(ConsoleMessage cm) {
|
||||
// log window.console stuff into the syslog for ADB output
|
||||
Log.d("com.jakbox.ingressTC", cm.message() + " -- "
|
||||
+ (cm.sourceId()==null?"main document":cm.sourceId())
|
||||
+ ":Line " + cm.lineNumber() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
75
mobile/README.md
Normal file
@ -0,0 +1,75 @@
|
||||
IITC Mobile (IITCM)
|
||||
===================
|
||||
|
||||
```
|
||||
# # ####### ####### ###### ####### # ###### # #
|
||||
## # # # # # # # # # # # # #
|
||||
# # # # # # # # # # # # # # #
|
||||
# # # # # # ###### ##### # # # # #
|
||||
# # # # # # # # # ####### # # #
|
||||
# ## # # # # # # # # # # #
|
||||
# # ####### # # # ####### # # ###### #
|
||||
```
|
||||
|
||||
- This is **alpha quality** software
|
||||
- There are more bugs than in all Indiana Jones titles combined
|
||||
- It will kill your data plan. Caching has been explicitly disabled for testing, so every restart nets you ~500 KiB of code. Since it uses raster maps instead of vector ones, the transfer volume is larger than for Google Maps, too.
|
||||
|
||||
|
||||
### read this guide thoroughly.
|
||||
|
||||
How to report bugs
|
||||
------------------
|
||||
|
||||
Be sure to [read the normal guide on how to report bugs](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#how-do-i-report-bugs). In addition, provide these details:
|
||||
- Android version
|
||||
- device used (exact name)
|
||||
- screen size in pixels
|
||||
|
||||
**I will close all bug reports without this information without comment.** Gather all information, then make a new issue. It seems you can’t reopen a ticket if I close it, so this is necessary unfortunately.
|
||||
|
||||
|
||||
Can I share this?
|
||||
-----------------
|
||||
|
||||
You may, but only with technically skilled friends. If you do please point them to this page only. Reading these guides ensures only high quality bug reports are made which speeds up development. This is in everyone’s interest, as the time spent on working on bogus reports is not spent on improvements.
|
||||
|
||||
Once the app is ready for a broader audience, this will be made easier. For now it should only be used by developers who can help or send in improvements.
|
||||
|
||||
|
||||
How do I…?
|
||||
----------
|
||||
|
||||
- **Login:** on tablets, this should just work. On smartphones you’ll see a black screen with some blue lines. This is the normal Ingress login page and you need to scroll to see the login button.
|
||||
- **Clear Data/Cache:** Open app launcher and find the IITCM icon. Press-and-hold and then drag it to “App Info” on the top right of the screen. There’s a “clear data” and “clear cache” button.
|
||||
- **Logout:** Not possible from within the app. See *Clear Data/Cache* and use “clear data”.
|
||||
- **Reload:** Not possible from within the app. Instead, open your recent applications and force close IITCM. It should reload after restarting.
|
||||
- **“Your account has not been enabled to play Ingress“**: See *Reload*.
|
||||
- **Install:** You can find this out yourself. If you don’t know how, then please wait for a more polished version of IITCM.
|
||||
- **Update:** You can check if there’s a new APK build by looking at the [apk_version](https://github.com/breunigs/ingress-intel-total-conversion/raw/gh-pages/mobile/apk_version file)[.](https://mathphys.fsk.uni-heidelberg.de/~stefan/test/IngressIntelTC.apk) It contains the date of the last update. The app uses the latest IITC hourly build automatically. You may need to clear your cache to force a reload, see *Clear Data/Cache*. Also note that the dot after “apk_version” is the download link to the APK.
|
||||
|
||||
How does this basically work?
|
||||
-----------------------------
|
||||
|
||||
The Android App uses a WebView to render the normal web page. Some code is required to make this work like one would expect, but in a nutshell this is a webbrowser without URL bar. On page load, the app injects `bootstrap.js` which is a specialized loader. While it has some additional checks to make the boot process nicer on slower mobile phones but is mainly required to load vanilla IITC. It’s not possible to load IITC directly due to contraints defined by the injection method. After IITC is injected, it works the same way as on desktop browsers. Tablets are served the desktop version and apart from larger portals there is no change to the GUI. Smartphones execute the code in `code/smartphone.js` and load `smartphone.css`. This is required because their display is too small for the desktop version.
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
If you want to debug the APK, I suggest [reading up on Google’s documentation](https://developer.android.com/index.html).
|
||||
|
||||
Debugging IITC(M) **after** it has booted is relatively easy: you can switch to the “debug” tab, which is a low end developer console. It renders all calls to `console.*`, so you can use it just like you expect. It may be easier to develop in a desktop browser. Set it up like explained [in the normal hacking guide](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md), but fake your user agent or modify the detection in `code/smartphone.js` and `main.js`. You don’t need to rebuild the APK to point it to your `iitc-test.user.js` file. Instead, modify `mobile/bootstrap.js` and add yourself with device ID and URL, then [send in a pull request](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#sending-patches). The device ID is printed to the debug console on IITC boot.
|
||||
|
||||
Debugging IITC(M) **before** it has booted requires the Android Developer Tools. Connecting your device and running `adb logcat` should print the debug log to your computer until the low-end dev console mentioned above is available. You may need to root your device.
|
||||
|
||||
|
||||
Building the APK
|
||||
----------------
|
||||
|
||||
No idea. Please write docs and send patches.
|
||||
|
||||
|
||||
Download APK
|
||||
------------
|
||||
|
||||
Well, glad you read to the end. Enjoy and send patches, bug reports, postcards and love. (If you are wondering where the download link is, I’m wondering if you have actually read the page.)
|
1
mobile/apk_version
Normal file
@ -0,0 +1 @@
|
||||
0.1-2013-02-23
|
59
mobile/bootstrap.js
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
var rebuidAttemptCount=0;
|
||||
var iitcReadyCount=0;
|
||||
var iitcURL;
|
||||
|
||||
function rebuildUI() {
|
||||
// this is sub-optimal, but we need a way to know if we're on a login page, or the real page.
|
||||
if(document.getElementById('dashboard_container')) {
|
||||
var dash = document.getElementById('dashboard_container');
|
||||
// dashboard is there, not conclusive
|
||||
if(dash.childNodes[0].innerHTML == 'Welcome to Ingress') {
|
||||
// not really 'ready', but the user needs the page for login purposes
|
||||
android.pageReady(1);
|
||||
return;
|
||||
} else if(!document.getElementById('map_canvas')) {
|
||||
// not loaded yet? we'll wait
|
||||
if(rebuidAttemptCount < 10) { // wait up to 5 seconds, then assume failure and show the page
|
||||
setTimeout(rebuildUI, 500);
|
||||
rebuidAttemptCount++;
|
||||
if(window.console) { console.log('Looking for Ingress Intel UI elements: ' + rebuidAttemptCount); }
|
||||
return;
|
||||
} else {
|
||||
if(window.console) { console.log('Something is wrong, flipping views'); }
|
||||
android.pageReady(1);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
window.UIDone = true;
|
||||
}
|
||||
|
||||
window.console.log(window.deviceID);
|
||||
window.console.log(navigator.userAgent);
|
||||
|
||||
switch(window.deviceID) {
|
||||
case '41ddb619ea1fe75a': // blakjakau - TABLET
|
||||
iitcURL = 'http://mathphys.fsk.uni-heidelberg.de:8000/test.js';
|
||||
break;
|
||||
|
||||
case 'f30c2cce86c1c7': // breunigs
|
||||
iitcURL = 'http://mathphys.fsk.uni-heidelberg.de:8000/test.js';
|
||||
break;
|
||||
|
||||
default:
|
||||
iitcURL = 'http://mathphys.fsk.uni-heidelberg.de:8000/test.js';
|
||||
}
|
||||
window.loadJS(iitcURL); // load iitc and let it do its thing.
|
||||
window.iitcReadyTimer = setInterval(function() {
|
||||
if(window.iitcLoaded == true || iitcReadyCount > 10) {
|
||||
//wait up to 10 seconds from calling iitc to fliping the webviews
|
||||
//if for some reason iitc isn't loading, the user will just get the vanila ingres.com/intel experience
|
||||
try {
|
||||
android.pageReady(1); // tell the app to flip the webviews
|
||||
clearInterval(window.iitcReadyTimer); // and we're done.
|
||||
} catch(e) { if(window.console) { console.log(e.message); } }
|
||||
}
|
||||
iitcReadyCount++;
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
rebuildUI();
|
110
mobile/smartphone.css
Normal file
@ -0,0 +1,110 @@
|
||||
body {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#sidebar, #updatestatus, #chatcontrols, #chat, #chatinput {
|
||||
background: #0B3351 !important
|
||||
}
|
||||
|
||||
|
||||
.leaflet-control-layers {
|
||||
margin-left: 0 !important;
|
||||
margin-top: 40px !important;
|
||||
}
|
||||
|
||||
#chatcontrols {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
/* hide shrink button */
|
||||
#chatcontrols a:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chatcontrols a {
|
||||
width: 50px;
|
||||
height:36px;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
line-height: 36px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#chat {
|
||||
left:0;
|
||||
right:0;
|
||||
top:37px !important;
|
||||
bottom:30px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#chatinput {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
#chat td:nth-child(2), #chatinput td:nth-child(2) {
|
||||
width: 77px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#sidebartoggle {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#scrollwrapper {
|
||||
top: 36px;
|
||||
bottom: 0;
|
||||
max-height: none !important;
|
||||
width: 100% !important;
|
||||
right: 0;
|
||||
left:0;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
width: 100% !important;
|
||||
min-height: 100%;
|
||||
border:0;
|
||||
}
|
||||
|
||||
#sidebar > * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#playerstat {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#portaldetails {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.fullimg {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-base {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-overlays {
|
||||
float: left;
|
||||
margin-left: 8px;
|
||||
border-left: 1px solid #DDDDDD;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-separator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-list label {
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.leaflet-control-attribution {
|
||||
|
||||
}
|
@ -9,19 +9,23 @@ Plugins are installed the same way the total conversion script is. Please see th
|
||||
Available Plugins
|
||||
-----------------
|
||||
|
||||
- [**Draw Tools**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js) allows to draw circles and lines on the map to aid you with planning your next big field.
|
||||
- [**Compute AP Stats**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js) Shows the potential AP an agent could obtain by destroying and rebuilding all the portals in the current zoom area.
|
||||
- [**Draw Tools**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js) allows to draw circles and lines on the map to aid you with planning your next big field. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_draw_tools.png)
|
||||
- [**Guess Player Level**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/guess-player-levels.user.js) looks for the highest placed resonator per player in the current view to guess the player level.
|
||||
- [**Highlight Weakened Portals**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js) fill portals with red to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing.
|
||||
- [**Player Tracker**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js) Draws trails for user actions in the last hour. At the last known location there’s a tooltip that shows the data in a table. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_player_tracker.png).
|
||||
- [**Render Limit Increase**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/render-limit-increase.user.js) increases render limits. Good for high density areas (e.g. London, UK) and faster PCs.
|
||||
- [**Resonator Display Zoom Level Decrease**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js) Resonator start displaying earlier.
|
||||
- [**Max-Links**]((https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/rmax-links.user.js) Calculates how to link the portals to create the maximum number of fields.
|
||||
- [**Show Portal Address**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-address.user.js) Shows portal address in the side panel.
|
||||
- [**Max-Links**]((https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/max-links.user.js) Calculates how to link the portals to create the maximum number of fields.
|
||||
|
||||
### available only with the development version
|
||||
|
||||
The development version is not available publicly, you need to build it yourself. See [HACKING.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#hacking) for guides.
|
||||
[Read HACKING.md file](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#hacking) to learn how to build the development version yourself. If **and only if** [you have read how to report bugs](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#how-do-i-report-bugs), you may beta test the [nightly](https://www.dropbox.com/sh/lt9p0s40kt3cs6m/3xzpyiVBnF) version.
|
||||
|
||||
|
||||
|
||||
|
||||
- [**Player Tracker**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js) Draws trails for user actions in the last hour. At the last known location there’s a tooltip that shows the data in a table. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_player_tracker.png). **REQUIRES 2013-02-19+**
|
||||
- [**Compute AP Stats**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js) Shows the potential AP an agent could obtain by destroying and rebuilding all the portals in the current zoom area. **REQUIRES 2013-02-22+**
|
||||
|
||||
Hacking
|
||||
-------
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-compute-ap-stats@Hollow011
|
||||
// @name iitc: Compute AP statistics
|
||||
// @version 0.1
|
||||
// @version 0.2
|
||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js
|
||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js
|
||||
@ -21,7 +21,27 @@ if(typeof window.plugin !== 'function') window.plugin = function() {};
|
||||
window.plugin.compAPStats = function() {};
|
||||
|
||||
window.plugin.compAPStats.setupCallback = function() {
|
||||
$('#toolbox').append('<a onclick="window.plugin.compAPStats.guess()">Compute AP Stats</a> ');
|
||||
// add a new div to the bottom of the sidebar and style it
|
||||
$('#sidebar').append('<div id="available_ap_display"></div>');
|
||||
$('#available_ap_display').css({'color':'#ffce00', 'font-size':'90%', 'padding':'4px 2px'});
|
||||
|
||||
// do an initial calc for sidebar sizing purposes
|
||||
window.plugin.compAPStats.onPositionMove();
|
||||
|
||||
// make the value update when the map data updates
|
||||
var handleDataResponseOrig = window.handleDataResponse;
|
||||
window.handleDataResponse = function(data, textStatus, jqXHR) {
|
||||
handleDataResponseOrig(data, textStatus, jqXHR);
|
||||
window.plugin.compAPStats.onPositionMove();
|
||||
}
|
||||
}
|
||||
|
||||
window.plugin.compAPStats.onPositionMove = function() {
|
||||
var result = window.plugin.compAPStats.compAPStats();
|
||||
$('#available_ap_display').html('Available AP in this area:<table>'
|
||||
+ '<tr><td>Enlightened:</td><td style="text-align:right">' + digits(result[1]) + '</td></tr>'
|
||||
+ '<tr><td>Resistance:</td><td style="text-align:right">' + digits(result[0]) + '</td></tr>'
|
||||
+ '</table>');
|
||||
}
|
||||
|
||||
window.plugin.compAPStats.compAPStats = function() {
|
||||
@ -34,11 +54,15 @@ window.plugin.compAPStats.compAPStats = function() {
|
||||
var allEnlEdges = [];
|
||||
var allEnlFields = [];
|
||||
|
||||
var displayBounds = map.getBounds();
|
||||
|
||||
// Grab every portal in the viewable area and compute individual AP stats
|
||||
$.each(window.portals, function(ind, portal) {
|
||||
var d = portal.options.details;
|
||||
|
||||
// eliminate offscreen portals (selected, and in padding)
|
||||
if(!displayBounds.contains(portal.getLatLng())) return true;
|
||||
|
||||
var portalStats = getAttackApGain(d);
|
||||
var portalSum = portalStats.resoAp + portalStats.captureAp;
|
||||
|
||||
@ -89,18 +113,6 @@ window.plugin.compAPStats.compAPStats = function() {
|
||||
return [totalAP_RES, totalAP_ENL];
|
||||
}
|
||||
|
||||
window.plugin.compAPStats.guess = function() {
|
||||
var res = window.plugin.compAPStats.compAPStats();
|
||||
var totalAP_RES = res[0];
|
||||
var totalAP_ENL = res[1];
|
||||
|
||||
var s = 'Calculated AP gain potential:\n\n';
|
||||
s += 'Available Resistance AP:\t' + digits(totalAP_RES) + '\n';
|
||||
s += 'Available Enlightened AP:\t' + digits(totalAP_ENL) + '\n';
|
||||
|
||||
alert(s);
|
||||
}
|
||||
|
||||
var setup = function() {
|
||||
window.plugin.compAPStats.setupCallback();
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-player-tracker@breunigs
|
||||
// @name iitc: player tracker
|
||||
// @version 0.4
|
||||
// @version 0.5
|
||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
||||
@ -76,10 +76,11 @@ window.plugin.playerTracker.processNewData = function(data) {
|
||||
$.each(json[2].plext.markup, function(ind, markup) {
|
||||
switch(markup[0]) {
|
||||
case 'TEXT':
|
||||
// Destroy link messages depend on how the link was originally
|
||||
// created. Therefore it’s not clear which portal the player is
|
||||
// at, so ignore it.
|
||||
if(markup[1].plain.indexOf('destroyed the Link') !== -1) {
|
||||
// Destroy link and field messages depend on where the link or
|
||||
// field was originally created. Therefore it’s not clear which
|
||||
// portal the player is at, so ignore it.
|
||||
if(markup[1].plain.indexOf('destroyed the Link') !== -1
|
||||
|| markup[1].plain.indexOf('destroyed a Control Field') !== -1) {
|
||||
skipThisMessage = true;
|
||||
return false;
|
||||
}
|
||||
|
55
plugins/show-address.user.js
Normal file
@ -0,0 +1,55 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-show-address@vita10gy
|
||||
// @name iitc: show portal address in sidebar
|
||||
// @version 0.2
|
||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-address.user.js
|
||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-address.user.js
|
||||
// @description Portal address will show in the sidebar.
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// ==/UserScript==
|
||||
|
||||
function wrapper() {
|
||||
// ensure plugin framework is there, even if iitc is not yet loaded
|
||||
if(typeof window.plugin !== 'function') window.plugin = function() {};
|
||||
|
||||
|
||||
// PLUGIN START ////////////////////////////////////////////////////////
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.portalAddress = function() {};
|
||||
|
||||
window.plugin.portalAddress.portalDetail = function(data) {
|
||||
// If there's 4 sets of comma delimieted info the last one is the
|
||||
// country, so get rid of it. If the country is in the [2] then it
|
||||
// doesn't matter because address is usually short enough to fit.
|
||||
var d = data.portalDetails.portalV2;
|
||||
var address = d.descriptiveText.ADDRESS.split(',').splice(0,3).join(',');
|
||||
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
||||
}
|
||||
|
||||
var setup = function() {
|
||||
window.addHook('portalDetailsUpdated', window.plugin.portalAddress.portalDetail);
|
||||
$('head').append('<style>' +
|
||||
'.res #address { border: 1px solid #0076b6; }' +
|
||||
'.enl #address { border: 1px solid #017f01; }' +
|
||||
'#address { margin:5px; padding:3px; margin-top:120px; margin-right:8px; font-size:11px; background-color:rgba(0, 0, 0, 0.7); text-align:center; white-space:nowrap; overflow:hidden; }' +
|
||||
'</style>');
|
||||
}
|
||||
|
||||
// PLUGIN END //////////////////////////////////////////////////////////
|
||||
|
||||
if(window.iitcLoaded && typeof setup === 'function') {
|
||||
setup();
|
||||
} else {
|
||||
if(window.bootPlugins)
|
||||
window.bootPlugins.push(setup);
|
||||
else
|
||||
window.bootPlugins = [setup];
|
||||
}
|
||||
} // wrapper end
|
||||
// inject code into site context
|
||||
var script = document.createElement('script');
|
||||
script.appendChild(document.createTextNode('('+ wrapper +')();'));
|
||||
(document.body || document.head || document.documentElement).appendChild(script);
|
BIN
screenshots/plugin_draw_tools.png
Normal file
After Width: | Height: | Size: 257 KiB |
Before Width: | Height: | Size: 494 KiB After Width: | Height: | Size: 472 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 174 KiB |
15
tools/iitc-nightly.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd /tmp
|
||||
rm -rf ingress-intel-total-conversion
|
||||
git clone --depth=1 git://github.com/breunigs/ingress-intel-total-conversion.git
|
||||
cd ingress-intel-total-conversion
|
||||
./build.py
|
||||
|
||||
date=$(date +"%Y-%m-%d")
|
||||
commit=$(git rev-parse HEAD | head -c 10)
|
||||
|
||||
# https://github.com/andreafabrizi/Dropbox-Uploader
|
||||
dropbox-up upload iitc-debug.user.js iitc-nightly/iitc-nightly-$date-$commit.user.js
|