Giter VIP home page Giter VIP logo

ingress-intel-total-conversion's Introduction

iitc logo

Ingress Intel Total Conversion (IITC)


Build Status Release Commits since LICENSE

IITC is a browser add-on that modifies the Ingress intel map. It is faster than the standard site, and offers many more features. It is available for desktop browsers, such as Firefox and Chrome, and as a mobile application.

IITC "Community Edition" (IITC-CE) started by modos189 to continue development of stalled iitc-project.

Website | API Documentation | Wiki | Telegram channel


Users

Install IITC: https://iitc.app/

Developers

Related projects

ingress-intel-total-conversion's People

Contributors

3ch01c avatar blakeorth avatar boombuler avatar cathesaurus avatar costaspap avatar dingram avatar fkloft avatar fragger avatar hastarin avatar hobadee avatar hubertzhang avatar ibotpeaches avatar jasonmillward avatar jonatkins avatar le-jeu avatar lecradle avatar mcben avatar modos189 avatar mysticjay avatar nexushoratio avatar numinit avatar perringaiden avatar qnstie avatar scrool avatar sorgo avatar vita10gy avatar weblate avatar xelio avatar xosofox avatar xscreach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ingress-intel-total-conversion's Issues

Hi-res icons

Some icons are extremely low-res and need to be enhanced/replaced.

Most important:

  • Bookmark star from this sprite: bookmarks-img.png
  • icon-bookmark.png, icon-bookmark-map.png
  • marker-star.png
  • current-location.png

Also:

Externals:

  • minimap-toggle.png
  • pan-down.png, pan-left.png, pan-right.png, pan-up.png
  • zoom-slider.png

Consider using Leaflet.Tooltip

Since Leaflet 1.0 there is buildin L.Tooltip functionality, which can be more powerful than IITC's own custom tooltips.

For example, it could be used in player-tracker in order to provide (optionally) permanent labels for players' nicks.

I saw some plugins capable of that, but their implementations are far from perfect (main issue: overlapping labels).

Some ideas where we may use tooltips:

  • Portal info tooltip #195
  • Portal permanent label (as replacement for portal-names plugin)
  • Players' nicks for player-tracker

Support maptiles based on GCJ02 (Chinese)

Plugin Sync error: undefined, undefined

After returning from hibernate mode I've got multiple alerts windows opened:
Plugin Sync error: undefined, undefined.

In plugin dialog I can see this log:

1:47:04 AM: Authorized
1:47:04 AM: Retry in 10 sec.: bookmarks[bkmrksObj]
1:47:04 AM: Drive API Error: undefined
1:47:04 AM: Authorized
1:47:04 AM: Retry in 10 sec.: bookmarks[bkmrksObj]
1:47:04 AM: Drive API Error: undefined
1:47:04 AM: Authorized
1:47:04 AM: Retry in 10 sec.: bookmarks[bkmrksObj]
1:47:04 AM: Drive API Error: undefined
1:47:04 AM: Authorized

In DevTools console I see a lof of errors like these:

content.googleapis.com/discovery/v1/apis/drive/v3/rest?fields=kind%2Cname%2Cversion%2CrootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods%2CbatchPath%2Cid&pp=0:1 Failed to load resource: net::ERR_NAME_NOT_RESOLVED
content.googleapis.com/discovery/v1/apis/drive/v3/rest?fields=kind%2Cname%2Cversion%2CrootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods%2CbatchPath%2Cid&pp=0:1 Failed to load resource: net::ERR_NETWORK_CHANGED
content.googleapis.com/drive/v3/files/1P8umW4139M9HPyNK5NF5ad_Oe1H4iI73?alt=media:1 Failed to load resource: the server responded with a status of 401 ()

Uniform code style

In current code base we can see now a variety of different styles.
It would be great to bring everything to some common code style.

So let's discuss here:

  1. Elements of iitc-code uniform style

  2. Tools to implement style checking, and ways to include them in our CI-chain.

Idea: region selection utility

There are A LOT of plugins (some we can see in #2) with same demand:

  • choose several portals for further processing
  • or just limit processing objects to some area

Instead of re-implement the same functions in each plugin it would be very convenient if IITC provides this as utility function(s).

And more: imho existing implementations are not generic enough.
E.g.:

So, the best solution would be to make objects selection tool as plugin.

Edit: this is actually not new idea: iitc-project/ingress-intel-total-conversion#736 (comment)

Merging with community development

Development has stopped in the main project, but third-party developers continue to improve IITC.

The goal of this project is to adopt useful Pull-Requests, and to continue the development of IITC with the provision of an updatable site, script and mobile application.

Prompt delivery of updates will soon be very important when Niantic is engaged in updating the Intel map.

You need to check these changes, and if they are good, then take the project:

Core

Fixes

Not needed / reverted

  • Fix. Touch events default passive to false #1261 by ReinRaus [Fixed by update leaflet]
  • enable click in portalinfo on smartphone #1125 by HubertZhang reverted by 2b37b00
  • Fix Intel Map URL #1291 by lm9 [not need anymore]

Plugins:

New

Enhancements:

  • [keys] add accesskey shortcuts for incrementing/decrementing key count #855 by danmana
  • Sync, keys and keys-on-map: Implement the "Capsule concept" for portal keys #1160 by IIGhouLII
  • score-cycle-times: adds dialog with all checkpoints in current cycle #859 by golesny
  • score-cycle-times: Remove seconds, regardless if it has AM/PM or not. #968 by imsaguy
  • Fly-links: Region selection with the draw-tool plugin #1084 by Fly33
  • Portal counts plugin will show the amount of resonators as well #1089 by schoentoon
  • Change visited neutral portal fill when uniques are highlighted #1119 by benjamincuningham
  • Update portal-highlighter-portal-ap.user.js #1135 by swined
  • Portals-list fix #1169 by McBen and Add mapZoomHasPortals and additional JSDoc #3 by hayeswise
  • Add drawtools support and improve portal list display #1190 by pleasantone
  • Add HOOK to "userLocation" plugin #1177 by ZasoGD
  • Fix a typo in plugins/regions.user.js #1213 by felixonmars
  • [Canvas] Specify order so Scriptish Load Canvas before IITC by specifying run-at #947 by MikePach [not need anymore]
  • Add ability to change how far each button press will pan #918 by nexushoratio

bookmarks-by-zaso

draw-tools

  • Update draw-tools.user.js #1033 by ATXadam
    (Add Merge option to allow pasting of new draw tools in existing draw tools memory)
    Added “Paste and Keep Data” feature to draw tools plugin #914 by markfguerra
  • Correct import issue with (new) standard intel #1290 by EvoldicA
  • draw-tools: Remove duplicate links in copy URL #1270 by nheir
  • Strip invalid characters from beginning and end of pasted strings #1242 by retsoksirhc

cross_link

player-tracker

Maps

Debug output: make conditional

iitc writes a lot of debug info to console log, but it's not useful for general use, and only adds 'noice' to log.
It would be more useful if such thing were wrapped in something like this:

function window.debug.log (info) {
  if (window.debug.ENABLE_LOG) {
    console.log (info)
  }
}

Condition could be more complex:

function window.debug.log (level,info) {
  if (debug.ENABLE_LOG.ALL or debug.ENABLE_LOG[level]) {
    console.log (info)
  }
}

In order to control the condition ENABLE_LOG we could use additional plugin.

Unable to reinstall apk: INSTALL_FAILED_UPDATE_INCOMPATIBLE

Edited

Unable to reinstall apk with changed signature.
The problem appeared after uninstalling previous build truing to keep it's data with this command:

adb uninstall [-k] <package> - remove this app package from the device
                               ('-k' means keep the data and cache directories)

Please help.

try/catch blocks empty?

In many places of code with inline include (@@INCLUDERAW...@@) I see patterns like this:

try { console.log('Loading included JS now'); } catch(e) {}

Issues management

We have here a bunch of 'issues' already. And I'm going to post more and more ideas there.

We should somehow arrange them, labeling as bug/feature/idea, plugin/core/development, etc.

Manage upstream externals

Currently we have separate sub-directory with all upstream 'externals' (+ separate images subdirectory)

Most of them described in ATTRIBUTION.md.
Some of them have version info inside, but most of them not.
Some of them are even modified for iitc special needs, but in order to know details we have to dig though unclear commit history.

It's a pain to maintain and update these sources.

So I propose:

  • Update all 'externals' to current version

Then:

  • To document somewhere (for each 'external'):
    • version
    • url to upstream
    • add some comments
      • purpose, and where in iitc it is used
      • why was this component chosen
  • When updating write verbose commit message, incl. url / version info / hash.
  • If the source was modified, then we should:
    • add original unmodified
    • apply modification(s) as a separate commit(s), with verbose messages explaining purpose of changes
    • in case of heavy modification: keep separate branch, or make a fork of original repo (could be hosted in https://github.com/IITC-CE/).
  • Find a way to avoid source modification
    • extend the component in some official way (if possible)
    • monkey-patch at run-time
    • push changes to upstream (via PR)
      And in general:
  • Avoid in IITC/plugins own code inline including of 3rd-party code (and images).
    Use @@INCLUDExxx-macros instead.

Related links:

  • Remove customizations of third-party code library #1165
  • Which Directory for Reusable Code? #1185

Modular code design

(Well, I think it's rather our goal manifest than an issue)

Currently IITC code is divided by source files, but still not organized well enough, as different parts are not encapsulated, and all inter-dependencies are not obvious.

All IITC-specific objects now resides in global window namespace, polluting it with multiple rather chaotic entities, and it's often hard to identify where they come from (which source file, or may be even from stock intel?).

Even more: namespace is now heavily polluted with IITC's private functions, which are never meant to be exposed (e.g. because it's impossible to reuse them).

So I propose:

  • Hide all private stuff, expose only that we are really in need.
  • Transform each source file into independent module with own namespace.
    Use IIFE everywhere (like in entity_decode.js, portal_detail.js).
  • Put all IITC objects into single IITC namespace object.

I believe that IITC own code should be exemplary, in order to facilitate clean and easy plugin writing for the whole community.
(Here is closely related issue: #46)

ES2015+?

It's 2019, and ES2015+ features supports is getting better among modern browsers.
Several patches from #2 already using some (mostly let/const).

So it would be great if we decide which of the features are 'safe' to use in whole project.
But to select particular features we need to consider target platforms of IITC, as some of them could be limited.

Perhaps most universal approach would be to:

  • Include some transpilling tool in our build chain.

basemap-gmaps-gray is not functional

error starting plugin: index 27, error: TypeError: L.Google is not a constructor

We can do one of these:

  • raw-include old Google plugin here.
  • re-base this plugin on GoogleMutant
  • include this gray version in core (drawback: layer chooser gets overfilled)

Plugins loading order

Some things are not obvious and should be documented somewhere.

In fact IITC core may be loaded before plugins, after plugins, or somewhere in the middle.
Although in some environments we could control the order, but if scripts are loading asynchronously, then bigger scripts will finish loading later (no matter of initial order).

So in general we can't expect particular order of IITC/plugins loading.

But plugin's function setup is called when iitc is booted, and we can rely on this.

So the rule:
Plugin can use all service API's (IITC/jQuery/Leaflet/...) only after setup called

Error when clicking at portaildetails/imgpreview [mobile]

VM2568:433 Uncaught TypeError: Cannot read property 'naturalWidth' of undefined
    at HTMLDivElement.<anonymous> (<anonymous>:433:33)
    at HTMLDivElement.dispatch (<anonymous>:15833:41772)
    at HTMLDivElement.y.handle (<anonymous>:15833:39791)

$('#portaldetails').on('click', '.imgpreview', function() {
var img = $(this).find('img')[0];
var details = $(this).find('div.portalDetails')[0];
//dialogs have 12px padding around the content
var dlgWidth = Math.max(img.naturalWidth+24,500);

As I understand this event handler in not meant to fire in mobile view mode, and here we see the (unsuccessful) attempt to turn it off:

$('div[class=imgpreview]').off('click', '**');

More cases to request write storage permissions

Request write storage permissions only if you add scripts.

When I open *.user.js at Chrome webpage (or in file manager) it proposes list of applications.
I select IITC and after confirmation all seems ok, but then Plugins settings screen appears without user plugins.

There should be permission request, I suppose.

And I think this even will not be enough, consider this case:
IITC was once installed and we have user plugins in IITC-Mobile/plugins directory.
Then we uninstall apk, and install it again.
Will we get permission request?

Originally posted by @johnd0e in #4 (comment)

Idea: development `test` branch

I have an idea how we could facilitate our development process, delivering new features faster, while keeping master branch clean, neat and stable.

So, what I propose:

  1. master branch is only for stable builds with well-tested (in other branches) changes.
    Push to master means (auto)deploying new stable build.
  2. For every new set of changes we use separate feature-branches (PRs), which should be made vs master.
    PRs are keeping open until final merging into master (it's possible to squash/rebase them to make history cleaner).
  3. development branch is for early-merging of feature-branches, as they go.
    'Early' means that we could merge them not well-tested, then fix, remerge, (force)reset, etc, not bothering to keep history clean.
    • Cons: could be unstable.
    • Pros: features delivered earlier, which in turn let to test them thoroughly.
  4. After we decide that feature is ready - we merge it into master, closing PR.

So instead of current test builds we get development builds (title is not important).

Main difference: there we could play with features more bravely, because we would not care about secondary things (such as clear history).

Mobile application: update built-in scripts, not apk.

Currently IITC for desktop is updated automatically by GM/TM (well, after #32 resolved).

Mobile is also capable to update plugins, but only external.
So why do not update built-in scripts in the same manner?

In most cases it's enough to update scrips, and leave 'old' apk (well, there could be rare exceptions 0ae25e1).

Maps looks bad on retina screen

Many included basemaps are looking not good enough, like low-res.
I suppose that it's possible to play with argument in order to improve maps.

Here will be the list with maps that have to be enhanced

  • Bing
  • Yandex
  • ...

Storage permission request for mobile apk

On start I've got only 1 permisson request: Location.
And there were no request about Storage access which is necessary e.g. for external plugins.

I was able to set the permission manually but it will be better if it requested on apk start.

Console warnings about Mixed Content

If using CartoDB maptiles set then console log contains many warning like this:

<no source>:12795: Mixed Content: The page at 'https://intel.ingress.com/intel?vp=m' was loaded over HTTPS, but requested an insecure image 'http://c.basemaps.cartocdn.com/dark_all/17/78347/45657.png'. This content should also be served over HTTPS.

I see this line in code:

var cartoUrl = 'http://{s}.basemaps.cartocdn.com/{theme}/{z}/{x}/{y}.png';

Imho as nia restricted intel to https we do not need to support http.

P.S.
Perhaps there is a lot of http-stuff left in other places, need to check.

Move and zoom to portal

Regarding this patch: 59cc312

  1. I am unable to see any icon (developer build).
    Perhaps there is some problem with svg rendering.
    Tried with different values of "Use Canvas rendering" option (btw McBen's fork does not have this
    option anymore)
  2. When I click on empty space at left of the title - map actually moves and zooms, but user cannot see it
    until he closes portal view .
    Imho it would be more intuitive if porlal view gets closed automatically.

UI color

is there the ability to change the UI theme according to the faction? and who knows a redesign? ta well outdated, btw good work on reliving this beautiful project!!

iitcui

itcuidark

IITCm menu: direct link to Plugins settings

I need access Plugins settings a lot more than any other setting item.
It would be convenient to have direct link to it in menu.
It may be optional (Advanced Settings / Configure IITCm menu).

Plugins' namespaces' usage

I have several conceptual questions regarding functions naming etc.
So the 1st:

  1. In all official plugins I see the same pattern of long-and-ugly namespace references, like window.plugin.showLinkedPortal.previewOptions (it's also inconsistent as somewhere there are references w/o window. prefix).

Shouldn't we fix it, like here: c1aec19?

@@-substitutions break validity of plugins' sources

Plugin's sources now are not valid js code, because of build-time substitution blocks like @@METAINFO@@, @@PLUGINSTART@@, @@PLUGINEND@@.

It complicates applying such tools like eslint.

It would be great if we could rearrange the code to make the substitutions appear commented, e.g.

// @@METAINFO@@
// ...
// @@PLUGINSTART@@
// ...
// @@PLUGINEND@@

Portal taphold does not work in canvas mode

// add event to portals that allows long press to switch to sidebar
window.addHook('portalAdded', function(data) {
data.portal.on('add', function() {
if(!this._container || this.options.addedTapHoldHandler) return;
this.options.addedTapHoldHandler = true;
var guid = this.options.guid;
// this is a hack, accessing Leaflet’s private _container is evil
$(this._container).on('taphold', function() {
window.renderPortalDetails(guid);
window.show('info');
});
});
});

In canvas mode _container property does not exist.

draw-tools does't work on touch

There are 2 ways to fix it:

  1. As suggested in iitc-project/ingress-intel-total-conversion#1142, leaflet.draw should be updated.
    And related fix: iitc-project/ingress-intel-total-conversion#1244 (fix earth radius to same value used in leaflet and S2).
    More recents work on both issues is seen here: https://github.com/McBen/ingress-intel-total-conversion

  2. There is alternative fix: iitc-project/ingress-intel-total-conversion#1261 (Touch events default passive to false).
    You can test it here: https://play.google.com/store/apps/details?id=com.cradle.iitc_mobile

Maps attribution is [partly] covered with IITC UI-elements

  • If attribution text is short it get completely covered by #updatestatus / #mobilestatus.
  • If text is long then we can see some parts of it (which is actually even worse).

How we could fix it:

BTW, there was old issue: #865

IITC theme / ui structure (internal)

  1. IITC colors are ugly.
    I hate background color most of all.
    Shouldn't we use default palette from Ingress intel?

  2. IITC css is chaotic.
    Currently in order to overdrive background I need to redefine a bunch of styles independently (instead of change just one value)

  3. IITC UI elements themselves are placed without proper hierarchy.
    E.g. #sidebartoggle is not a part of #sidebar (or #scrollwrapper).
    #chat and #chatcontrols are also independent elements.
    So it's hard to theme them as whole part, and we get issues trying to change placing or scaling properties.

  4. It's a common case in IITC if some complex element get completely cleared (or replaced, with all sub-elements). It's also undesirable in some cases, and it may be better to hide instead of clear (and update sub-elements individually, instead or rewriting whole parent element).

link-show-direction: issues with canvas rendering

This is not new issue, but previously it was not important, because canvas mode was experimental and optional.

So, plugin has 5 different modes, and only 2/5 are usable now:

  • Static
  • Animate full link

Honestly, I do not think that all 5 are worthful (for me, the only useful mode was Static near origin).
May be we need to think about some different way of visualization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.