Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins' namespaces' usage #46

Open
johnd0e opened this issue Jan 5, 2019 · 9 comments
Open

Plugins' namespaces' usage #46

johnd0e opened this issue Jan 5, 2019 · 9 comments
Labels
development general development issue

Comments

@johnd0e
Copy link
Contributor

johnd0e commented Jan 5, 2019

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?

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 5, 2019

  1. Is there a reason to have namespace as function-object?
    Why do not write just
var self = {}; // instead of function() {}

?

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 5, 2019

  1. Why we ever need those 'namespaces'?

I can imagine a reason: for monkey-patching plugin's internal functions, in order to customize or extend them.
Don't I miss other possible reasons?

If I don't, that should we expose in namespace every internal function?
Wouldn't be better something like this: 4e9ca02?

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 5, 2019

  1. As far as I know (and it's not much as js is new to me), functions' declarations are often preferable then anonymous functions, e.g. because in debugger stack view we can easy distinguish them by names.

So wouldn't be better do like this: 9ab75a8?

@modos189
Copy link
Contributor

modos189 commented Jan 6, 2019

I've seen your similar question in the parent repository, but I don't have an answer as to why it's done this way.
If the work does not break in browsers and does not violate backward compatibility with third-party scripts, I think you can safely change

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 6, 2019

Well, it definitely does not break anything in my experiments, but my testing is rather limited..

I think we should not make such changes globally yet (at least until #2 is completed).
I propose to consider this issue as step to general future code clean up.

Meanwhile, if there are no objections, I could apply this locally, to that parts of code that I am rewriting now anyway.

@modos189
Copy link
Contributor

modos189 commented Jan 6, 2019

Agreed. I will carefully test and if something breaks, I will inform

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 8, 2019

I found possible explanations. of that long function references.

  1. On exception there is a message in console, with these over-referenced functions' 'longnames', specifying place of error (so no need to open debugger).
  2. (still no clue)
  3. In order to see all functions 'longnames' in the console we need to put every of them (!) into that namespace.
  4. Declarated functions always shown with shortnames in console.

I have understood the reasons, but still not accepted them, as it is really ugly.
Errors occurs not so often, and I better will use debugger to see the their source.

What do you think?

@johnd0e
Copy link
Contributor Author

johnd0e commented Jan 8, 2019

In my opinion, for plugins we should avoid such namespace usage.

  • some complex plugin still may need namespace in order to be extendable by 3rd-party plugins (via monkey-patching).
  • simple plugins do not need namespace at all, see here: 7639fbc (imho sources got a lot cleaner)

@johnd0e johnd0e mentioned this issue Jan 13, 2019
3 tasks
@johnd0e johnd0e added the development general development issue label Jan 23, 2019
@johnd0e johnd0e mentioned this issue Feb 7, 2019
johnd0e pushed a commit that referenced this issue Oct 17, 2019
Update most upstream sources, and significantly enhance several plugins

Related issues: #70

* Update upstream externals
  - _jQuery_, _Leaflet_, _Leaflet.Draw_
  - _Bing_, _Yandex_ (a lot of enhances pushed by us to upstream)
  - _Geodesic_: refactor for easy extending/customizing/replacing any internal constant/function
  - Controls: _MiniMap_, _Pan_, _Zoomslider_, _FileLayer_ (+ _togeojson_)
  - _autolink_, _delaunay_, _Spectrum_ colorpicker, _taphold_
* Document them in `versions.md` and `ATTRIBUTION.md`
* Avoid inline code customization! Use bare unmodified sources where possible.
  - push changes to upstream (_Leaflet-MiniMap_), or use own forks (_jquery-taphold_, _Geodesic_)
     - some of our PRs already accepted (_Yandex_, _Bing_)
     - otherwise override in compatible way, such as
        - adding own css (_Leaflet.Pancontrol_, _Leaflet.zoomslider_)
        - or extend/monkey-patch using leaflet methods (_Leaflet.Draw_)
     - or specify link to PR (_Leaflet-MiniMap_, _OverlappingMarkerSpiderfier-Leaflet_)
       - todo: _s2-geometry-javascript_
     - or just describe changes if they are trivial (_LatLng_Bearings.js_) 
  - CSS: based on #102
* remove excessive dependencies (_load.js_, _KML_)
* Some (un)related plugins refactoring: #46, #58, and more
* Some plugins enhanced a lot:
  - overlay-kml
  - minimap
  - basemap-bing
  - basemap-yandex
  - pan-control (improve alignment with other controls)
  - tidy-links, etc (see commit messages)
modos189 referenced this issue in modos189/ingress-intel-total-conversion Nov 1, 2019
commit ec4f041991fa3c1a59051e9df739fbdaa7ff4a85
Merge: 5ec2475d 007c1030
Author: johndoe <[email protected]>
Date:   Wed Oct 30 14:08:40 2019 +0200

    Merge pull request #266 from modos189/iitcm-plugins-button

    IITC-Mobile: add 'Plugins' item to main menu

    Direct menu link to quickly open Plugins settings (it is also available in Setting dialog).

    Close #18

commit 007c1030f3f79f48ce9396ffea02523851ca8682
Author: Alexander Danilov <[email protected]>
Date:   Tue Oct 22 00:25:50 2019 +0300

    IITCm menu: direct link to Plugins settings (issue #18)

commit 5ec2475d12d6963f768c8e28044b6d9e588e3253
Merge: 5456b0c9 62527787
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 12:05:06 2019 +0300

    Merge pull request #134 from johnd0e/update-external

    Update most upstream sources, and significantly enhance several plugins

    Related issues: #70

    * Update upstream externals
      - _jQuery_, _Leaflet_, _Leaflet.Draw_
      - _Bing_, _Yandex_ (a lot of enhances pushed by us to upstream)
      - _Geodesic_: refactor for easy extending/customizing/replacing any internal constant/function
      - Controls: _MiniMap_, _Pan_, _Zoomslider_, _FileLayer_ (+ _togeojson_)
      - _autolink_, _delaunay_, _Spectrum_ colorpicker, _taphold_
    * Document them in `versions.md` and `ATTRIBUTION.md`
    * Avoid inline code customization! Use bare unmodified sources where possible.
      - push changes to upstream (_Leaflet-MiniMap_), or use own forks (_jquery-taphold_, _Geodesic_)
         - some of our PRs already accepted (_Yandex_, _Bing_)
         - otherwise override in compatible way, such as
            - adding own css (_Leaflet.Pancontrol_, _Leaflet.zoomslider_)
            - or extend/monkey-patch using leaflet methods (_Leaflet.Draw_)
         - or specify link to PR (_Leaflet-MiniMap_, _OverlappingMarkerSpiderfier-Leaflet_)
           - todo: _s2-geometry-javascript_
         - or just describe changes if they are trivial (_LatLng_Bearings.js_)
      - CSS: based on #102
    * remove excessive dependencies (_load.js_, _KML_)
    * Some (un)related plugins refactoring: #46, #58, and more
    * Some plugins enhanced a lot:
      - overlay-kml
      - minimap
      - basemap-bing
      - basemap-yandex
      - pan-control (improve alignment with other controls)
      - tidy-links, etc (see commit messages)

commit 625277873bc9464685d5162b82670f02f702bb18
Merge: 46bb8489 5456b0c9
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 11:41:00 2019 +0300

    Merge branch 'master' into update-external

commit 5456b0c9a23641caa13be3d40a1222d0f30134bb
Merge: 9004bf5f dcd158df
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 11:12:42 2019 +0300

    Merge pull request #238 from johnd0e/customwrapper

    Move wrapper template to separate file

    - Default template separated to `pluginwrapper.py`
    - Custom wrapper can be set in `localbuildsettings.py`
    - Same wrapper used for main script.
    - Misc (un)related changes

commit dcd158df2f9eb42989f82d59948fa89ca0e7abe2
Merge: c3a7b608 9004bf5f
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 11:11:30 2019 +0300

    Merge branch 'master' into customwrapper

commit 9004bf5ff551669c730a62fefcbf5ce98fd7ae3b
Merge: 3a14f21e 82f9c69c
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 11:04:20 2019 +0300

    Merge pull request #235 from johnd0e/logger

    Stop console 'spam' using customizable logger

    All console functions calls in core modules are proxified with [ulog].
    Fix #26: now by default only warnings and errors come to console.

    To see more details - logging level should be changed (it's also possible to filter output by specific modules).
    There are several ways to control logging, see [docs] for more info.

    [ulog]: https://github.com/Download/ulog
    [docs]: https://ulog.js.org/

commit 82f9c69ce56562cefba7aea67e9443b1654c8cc6
Merge: e3752dd1 3a14f21e
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 11:03:01 2019 +0300

    Merge branch 'master' into logger

commit 3a14f21efef6f0a7167cecddc0d76bdfa644d91b
Merge: 60235ea9 6f81d434
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 10:44:24 2019 +0300

    Merge pull request #234 from johnd0e/iife

    Isolate every core module in separate IIFE

    this is the 1st step to isolate modules without applying namespace to every single private function

    Ref: #52

commit 6f81d434f22a55915f2fe50419b3d8ce2519720e
Merge: 4b6669bf 60235ea9
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 10:43:30 2019 +0300

    Merge branch 'master' into iife

commit 60235ea94562a58cbd2fbe7c606ac66a1453df4e
Merge: 1d03f7bd 7c63c82b
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 10:20:44 2019 +0300

    Merge pull request #205 from johnd0e/plugins-priority

    Implement plugins priority control

    Improvements related to https://github.com/IITC-CE/ingress-intel-total-conversion/issues/76:

    * Plugin priority order is now controlled.
      Priority can be specified as `setup` property (see details in commit msg).
    * On error in setup:
       - show plugin name in log
       - strike-through plugin name in About window
    * `pluginCreateHook` function deprecated,
      it's now possible to use hooks without explicit creation.
    * Related fixes and refactoring

commit 7c63c82bce2b5dd0839bad6262ff974e8d49c173
Merge: cb6cb771 1d03f7bd
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 10:19:16 2019 +0300

    Merge branch 'master' into plugins-priority

commit 1d03f7bd78a8ce8dc2ad10aa39b3d91c00c8799d
Merge: 2d2e9de6 13c52985
Author: johnd0e <[email protected]>
Date:   Thu Oct 17 09:54:51 2019 +0300

    Merge pull request #212 from modos189/up-sync

    sync: fix and update

    Fixed synchronization errors. Updated log view.
    * Fix of the first synchronization
    * Removed an unnecessary timer that duplicates a repeated connection attempt in case of a
       network error
    * Change the display of the change log. Only the last message is shown or each synchronized file.
    * Disable error output with alert()

commit 13c52985368bdc7d10c007af53edfcb48ce50c4b
Author: Alexander Danilov <[email protected]>
Date:   Wed Oct 16 17:59:34 2019 +0300

    add 'uniques' to sync description

commit 4d9c8be9d7e28fdc25eefcbf2d4b3cfbb4c82b60
Author: Alexander Danilov <[email protected]>
Date:   Wed Oct 16 17:53:27 2019 +0300

    fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/226 Disable error output with alert()

commit c3a7b60822bb2755291582bc76236fc5fa7fe8ae
Author: johndoe <[email protected]>
Date:   Fri Sep 13 14:08:19 2019 +0300

    build.py: define ignore_patterns (for desktop-only plugins) in buildSettings

commit eed0b922cd66dcc508c8789379fc34cd5119524c
Author: johndoe <[email protected]>
Date:   Fri Sep 13 14:10:52 2019 +0300

    main.js: put all the code into wrapper

    so no need to mess with unsafeWindow

commit ea1ca62e1c9cdfcb59dfbd5e65aabcf1418d4dc0
Author: johndoe <[email protected]>
Date:   Fri Sep 13 12:58:40 2019 +0300

    main.js: apply same wrapper as for plugins

commit 7d9920b0c631c0d25a2d7700cf1442f0c07444ec
Author: johndoe <[email protected]>
Date:   Fri Sep 13 13:37:45 2019 +0300

    user-location: apply @@METAINFO@@ macro

commit b83f476eb34e35c31073ecdeafcf1643e3d07e2d
Author: johndoe <[email protected]>
Date:   Fri Sep 13 10:54:21 2019 +0300

    main.js: simplify meta block using @@METAINFO@@ macro

commit 9d97c0eea09207857f6204c64640ec914b1835e3
Author: johndoe <[email protected]>
Date:   Tue Aug 6 17:38:55 2019 +0300

    build.py: wrapper template can be customized

    default template separated to pluginwrapper.py

    custom wrapper can be set in `localbuildsettings.py`, e.g.:
    ```
    buildSettings = {
        'dev': {
            'distUrlBase': 'http://localhost:8101',
            'pluginWrapper': 'local_wrapper',  # import 'local_wrapper.py'
        },
    }
    ```

commit 999916745086e4a30f8ab75544ed1930b5762112
Author: johndoe <[email protected]>
Date:   Tue Aug 6 18:01:08 2019 +0300

    build.py: do not mask exceptions in localbuildsettings

commit 2d2e9de682d707848dc2b63957c572b78eea34c1
Author: johndoe <[email protected]>
Date:   Wed Oct 16 13:03:14 2019 +0300

    Merge pull request #168 from IITC-CE/up-readme

    fix 'build' badge https://github.com/IITC-CE/ingress-intel-total-conversion/issues/98#issuecomment-477723056

commit 0d7a15fe7d4982b7b81529186a13c99ea08c0d84
Merge: 91966967 73db3eb9
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:52:25 2019 +0300

    Merge pull request #164 from IITC-CE/fix-login-form

    IITC-Mobile: fix bugs on login page

    Fix sign-in buttons layout, which was broken after Niantic added facebook authorization, and more.
    Fix #160, fix #154, fix (part of) https://github.com/IITC-CE/ingress-intel-total-conversion/issues/163#issuecomment-482516494

commit 73db3eb9616acd0e2ed292425aa19c2346e92f25
Author: johndoe <[email protected]>
Date:   Wed Sep 4 13:40:28 2019 +0300

    main.js: minor refactoring

commit 555508dab89245fa4778f85f365d8457e013434a
Author: Alexander Danilov <[email protected]>
Date:   Mon Apr 15 14:24:09 2019 +0300

    Fix google login form on KitKat #154

commit 919669675babc857e9791610e365433f6f989647
Merge: e0cdc09e c9a0622e
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:42:10 2019 +0300

    Merge pull request #239 from IITC-CE/fix-file-picker-android

    IITC-Mobile: fix error that made it difficult to pick plugin file

    It was impossible to select a file in a standard android file picker

commit e0cdc09e8329fe233dd64545b3ee600774a31b65
Merge: 4239ebb3 1933336f
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:41:08 2019 +0300

    Merge pull request #169 from IITC-CE/mobile-screenshoots

    IITC-Mobile: fix 'Send screenshot' function

    Canvas mode is default in IITC-CE, and due to hardware acceleration, portals and links were not displayed when using build-in screenshot function.
    Fix #140.

    Also:
    - fix file sharing on Android >6
    - (unrelated) fix #31: background color of debug command line

    Note: current implementation is not reliable enough, so 'Send screenshot' menu item is not shown by default.

commit 4239ebb3dac9ff0e66f6ee7428a8dc1fd8143b3e
Merge: 2e13d721 0d912342
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:40:13 2019 +0300

    Merge pull request #245 from HubertZhang/test-builds

    IITC-Mobile: fix some bugs in plugins handling

    - allow tab as separator in metadata block
    - do not update plugin to random html returned on 404.
      (more to fix in #257)

    Fix #210

commit 2e13d721293c4abfe2dd5f3e98972cd1a16a942f
Author: Richard Poser <[email protected]>
Date:   Wed Oct 16 04:39:11 2019 -0500

    IITC-Mobile: 'Support DeX desktop mode' option (#161)

    Useful for automatically making the display to be desktop when running on the Samsung DeX desktop system while allowing for showing in regular mode on a smartphone without having the switch back and forth between Desktop and regular when moving between the two environments.

commit 7ac36697512e43b6996aa6c6e4085a9b7252aadc
Merge: a8b5fc52 75acd6e3
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:34:18 2019 +0300

    Merge pull request #250 from HubertZhang/hubert/iitcm

    IITC-Mobile: better handling of uploads

    Provide proper (and unified) handling of uploads.
    Implement file chooser for IITCm webview input element (#244 part 1).

commit a8b5fc520a96e3c687033c5ec517caaf3eeece06
Merge: 0b854ecc ad1db7d7
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:31:17 2019 +0300

    Merge pull request #175 from johnd0e/fix-drawtools

    draw-tools: fix mobile-related bugs; add Circle again

    ### Summary:
    * Fix Circle drawing on touch devices, so it's returned to toolbar.
    * Fix drawing with mouse on touch device.
    * Fix: it wasn't possible to cancel Circle drawing.

    ### Details:

    1. To work on touch Leaflet.draw (for some internal purposes) uses `touchExtend` handler.
       Previously it was not initialized as map was created before Leaflet.draw loading
       (https://github.com/Leaflet/Leaflet.draw/issues/923)
       So we enable it:
       - It's now possible to draw Circle/Rectangle on touchscreens
          (fix https://github.com/iitc-project/ingress-intel-total-conversion/issues/1294)
       - It's now possible to use mouse on touchscreen devices
          (fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/162)

    2. Unfortunately `touchExtend` handler is broken (seems in many ways), that leads to misc. issues,
        the most serious is https://github.com/Leaflet/Leaflet.draw/issues/789 (unable to draw polylines/polygons).
        Some workaround proposed in discussion of that issue, but none is perfect.
        Here in draw-tools we use another workaround: enable `touchExtend` handler only when it is needed (see 1)

    3. And last fix required patching of a upstream sources
       https://github.com/Leaflet/Leaflet.draw/issues/922
       - It's now possible to cancel Circle/Rectangle drawing.
         This fix works fine in IITC, but is not perfect (see discussion)

    P.S.
    Some more draw-related fixes here: #157

commit 0b854eccbe32b6c684d02ec1a4a3971d1b0bfd99
Merge: 3d0484de cfc1c6fe
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:27:32 2019 +0300

    Merge pull request #104 from johnd0e/better-styles

    Improve styles of text labels (portal-level-numbers, portal-names, portal-names, regions, keys-on-map)

    Some small but noticeable enhancements (mostly soften text shadows).

commit 3d0484de86702a068aa90b49fe94e1ff754b0acb
Merge: 5a05126f 0cbe93e6
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:26:30 2019 +0300

    Merge pull request #158 from johnd0e/misc-plugins-enhancements

    Improve scale-bar and scoreboard plugins

    * scale-bar: improve alignment with other controls; refactor
    * scoreboard: plugin rewritten
      - fix: didn't work on mobile
      - placeholders portals do not affect avg values now (their count is shown separately, in brackets)
      - prompt to zoom in only when needed
      - table: rearranged to be more compact

commit 5a05126fc182fe8ed8787d61fa90c2cb2726e72b
Merge: 5e3d952c 8a4ac0c8
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:25:23 2019 +0300

    Merge pull request #157 from johnd0e/fix-bugs

    Fix miscellaneous bugs in core and plugins

    - cache-portals-on-map: fix #103: _TypeError_ while running hook `mapDataEntityInject`
    - layer-count: fix #149 (error accessing private property)
    - bookmarks: fix #166: Bookmarks reorder error
    - draw-tools: fix #174: Circle edit is broken (actually `GeodesicCircle` was lost at some point)
    - draw-tools: fix #178: Circle is hard to draw
      Notes:
      - it's workaround only, actual bug is somewhere deeper
      - same problem is circumvented also by #175
    - utils_misc.js:
      - fix `removeLayerGroup` (#190)
      - fix `escapeHtmlSpecialChars`  (#211)
    - missions:
      - fix exception in `onWaypointsRefreshed`/`onMissionsRefreshed`
    - boot.js: `setupLargeImagePreview`
      - fix title (#215)
      - fix dialog was not properly centered
    - boot.js: fix `layerChooser.getLayers`
      to be again compatible with [existent](https://apps.apple.com/app/iitc-mobile/id1032695947) iOS mobile version

commit 5e3d952c6c48a49087ff040660416ff85549d27e
Merge: 3710a88e 082147bc
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:23:33 2019 +0300

    Merge pull request #198 from johnd0e/make-permalink

    Refactor to use common function window.makePermalink (utils_misc.js)

    Portal permalink is now shorter as it contain only `pll=` part.

    todoget rid of: `setPermaLink`, `androidPermalink`

commit 3710a88ed887dfa4185c13e79edcd29b941dc6b1
Merge: 30859383 1a27ed95
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:05:46 2019 +0300

    Merge pull request #101 from johnd0e/remove-unused

    Remove some unused stuff from window object

    Resonators info is not available since 2014, so get rid of unused stuff.
    Also remove panoramio links processing as it's gone long time ago.

commit 30859383c32f804ba938efedec2715a37cccb8a4
Merge: 61a1d1d5 e41e6489
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:04:33 2019 +0300

    Merge pull request #248 from johnd0e/fix-throw

    Consistent errors throwing

    Now using `throw new Error('message')`
    fix #191

    Note:
    For easy merging, some parts are left for #157 (utils_misc.js), #164 (main.js), #205 (hooks.js)

commit 61a1d1d55158fc577df8bc7f91e200ee4fa28ac4
Merge: 28fe5912 04a49037
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:03:08 2019 +0300

    Merge pull request #201 from johnd0e/fix-padding

    Increase map renderer padding (and make value customizable)

    - use renderer option instead of `L.Path.CLIP_PADDING` (which is not used in Leaflet 1.x)
    - remove value customization code, as currently it doesn't make much sense
    - experimental: set padding to `0.5`, both for Canvas and SVG
      This value can be overridden by option `window.PADDING`
      (need to be set in some plugin, before `setup`)

    Fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/184

    Other changes:
    - possibility to not prefer canvas
    - fix some code where canvas-related options need to be adapted lo leaflet 1.x
    - change some values in `RenderDebugTiles`

commit 28fe59121efa3ec8124ac43db1d2675e4c4f0117
Merge: 05f4077a 1e7766ae
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:02:17 2019 +0300

    Merge pull request #189 from johnd0e/no-touch

    Leaflet controls: prevent mobile style on desktop

    1. Modify `L.Browser.touch` in order to prevent mobile-styled controls in desktop (Leaflet v1 issue)

    2. Fix leaflet.draw toolbar icons alignment in desktop mode

commit 05f4077af4c793c1e014fbef78ffd100e5f8342d
Merge: 8a69534a c4c08c4b
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 12:01:19 2019 +0300

    Merge pull request #233 from Nipheon/Nipheon-remove-angled-brackets

    Portal info: display coordinates without angled brackets

    If Firefox it was hard to select coordinates (for copy), as doubleclick selected brackets too.

commit 8a69534adefe08f4fd62ae4bae1b17e578ef2691
Merge: ba6f9081 27fa41b0
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 11:59:43 2019 +0300

    Merge pull request #216 from johnd0e/artifacts#138

    Remove confusing message from artifacts dialog

    It used to be helpful when that news was new
    now it is confusing, especially when no artifacts shown.
    #138

commit ba6f90813387270744aea278b6b40ea671dac81f
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 11:58:24 2019 +0300

    Improve RegionScoreboard (#179)

    * RegionScoreboard improved © _McBen_ [#1045](https://github.com/iitc-project/ingress-intel-total-conversion/pull/1045) + some fixes

    * region_scoreboard.js: use mobile pane

    some improvements still needed
    - make width of chart variable (currently 400px hardcoded)
    - center chart when it is narrower than full screen width
    - pick better icon

    Note:
    This reverts commit 35f1467747f3aee73b6d87ab1200eb1e00ad2ef1.
    In order to clean merge of https://github.com/iitc-project/ingress-intel-total-conversion/pull/1045
    which already include https://github.com/iitc-project/ingress-intel-total-conversion/pull/1003

commit 09a0095a03bb900db823d481f5e6e2ab84b57158
Merge: 256f9c53 8d6e0732
Author: johnd0e <[email protected]>
Date:   Wed Oct 16 11:51:39 2019 +0300

    Merge pull request #181 from IITC-CE/test-leaflet-markers-canvas

    Fix performance drop when displaying a large number of ornaments

    Fix #143: draw on canvas (instead of multiple markers) with Leaflet.Canvas-Markers (forked from https://github.com/Spaction/Leaflet.Canvas-Markers)

commit 75acd6e31152b80979c4235588c3e23cc2403bc9
Author: Hubert Zhang <[email protected]>
Date:   Mon Sep 9 19:19:19 2019 +0800

    Implement onShowFileChooser for open file in IITCm, fix #244

commit c9a0622e6fd100fce93f1cd57cadee83aca9cf13
Author: Alexander Danilov <[email protected]>
Date:   Tue Sep 24 23:15:57 2019 +0300

    Allow more types when choosing user.js

    - text/plain: scripts from github.com
    - text/javascript: from openuserjs.org / greasyfork.org
    - application/octet-stream: files not from Downloads

commit 1257414218223a032e7051facf8e8ef330dcc012
Author: Alexander Danilov <[email protected]>
Date:   Sat Aug 17 01:14:56 2019 +0300

    Fix error that makes it impossible to select a file in a standard android file picker

commit 8d6e0732e8e3df4f01c3271355b71f2b5783c217
Author: johndoe <[email protected]>
Date:   Wed May 1 17:34:35 2019 +0300

    ornaments.js: render in canvas to solve performance issues (#143)

    New externals:
    * leaflet.canvas-markers.js:
      - include source IITC-CE/Leaflet.Canvas-Markers
        https://github.com/IITC-CE/Leaflet.Canvas-Markers/commit/3bc2ce5a050f6b64b912ba225abbf78bf7fd5733
    * rbush.min.js (required by leaflet.canvas-markers.js)
      -  https://unpkg.com/[email protected]/rbush.min.js

commit 0d912342cc71bed36e4d0a463843aea86cd4b298
Author: Hubert Zhang <[email protected]>
Date:   Wed Sep 25 00:10:01 2019 +0800

    Add final and lambda expression

commit 1933336f6193c07443d141c9d9698a3ea47218c7
Author: johndoe <[email protected]>
Date:   Tue Sep 24 13:03:14 2019 +0300

    IITCm: fix background color of debug command line

    fix #31

commit 0bd7ebf79dd7764e270593539b76f7c310ea7de2
Author: johndoe <[email protected]>
Date:   Wed Sep 18 17:07:47 2019 +0300

    IITCm: disable 'Send screenshot' menu item by default

    Currently this feature implementation is too hackish, and still not reliable.

commit f3867d5fafc3e7ced18fb157f311c3239858abf4
Author: Alexander Danilov <[email protected]>
Date:   Sun Apr 21 18:47:51 2019 +0300

    IITCm: Hack screenshots for Android >= 5.0 Lollipop

commit dcf951656bd88a1879670d5f728126eb356ee5a2
Author: Alexander Danilov <[email protected]>
Date:   Sat Apr 20 15:17:03 2019 +0300

    IITCm: do not use deprecated getDrawingCache() function

    Ref:
    https://developer.android.com/reference/android/view/View.html#getDrawingCache()
    https://developer.android.com/reference/android/view/View.html#draw(android.graphics.Canvas)

    Note:
    Recommended PixelCopy API does not perform better in our case,
    and limited to API level >= 24
    https://developer.android.com/reference/android/view/PixelCopy.html

commit 0a6807ef55668f216460cec5e87b2ebcbb96003f
Author: Alexander Danilov <[email protected]>
Date:   Sun Apr 21 18:48:17 2019 +0300

    IITCm: fix exception when sharing file in Android >= 8.0 Oreo

    That may not work properly for Android < 8, so we keep using old method there.

    Ref:
    - https://developer.android.com/reference/android/os/FileUriExposedException
    - https://developer.android.com/reference/androidx/core/content/FileProvider

    More info:
    - https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed

commit e3752dd1c056abe7fca94c7751f01cfe83b48bf4
Author: johndoe <[email protected]>
Date:   Tue Aug 6 13:48:32 2019 +0300

    code/*.js: apply ulog to each module

commit ba32de15d5b75c53e28503bda875f998037b83cc
Author: johndoe <[email protected]>
Date:   Tue Aug 6 11:19:00 2019 +0300

    external: add ulog.min.js 2.0.0-beta.6 (558b6c7dc071f877252509f104134eec0183ab4b)

    https://github.com/Download/ulog/raw/fc5a47e5508342dd8e625da80cd3f61036802faf/ulog.min.js

    `ulog` is available to submodules

commit 46bb848994d287ec77c44a5554e82533d17f55c4
Author: johndoe <[email protected]>
Date:   Wed Sep 11 10:01:17 2019 +0300

    overlay-kml: make use of #250

    IITCm now does not require special handling

commit 76243bb3014323be647355ee976ba55140d22818
Author: johndoe <[email protected]>
Date:   Thu Aug 8 10:44:06 2019 +0300

    external: L.Geodesic.js update to 95e8bb77e344ec2894f92820aabbc0afcb930a50

    Switch to our own fork: https://github.com/IITC-CE/Leaflet.Geodesic

commit 49d31f92405e7001778d4573adcba34fe0d17151
Author: johndoe <[email protected]>
Date:   Tue Aug 13 16:27:52 2019 +0300

    external: update Leaflet.draw to version 1.0.3 (1.0.4)

    separate draw customizations

commit 60c03672e4842811bbc19b5a3981c360196856ed
Author: johndoe <[email protected]>
Date:   Tue Jul 2 14:46:06 2019 +0300

    update ATTRIBUTION.md

commit 2b02a87a4c5b00385c9c9ce177d04e2bd5c855fd
Author: johndoe <[email protected]>
Date:   Tue Jul 2 14:09:36 2019 +0300

    external: remove Load.js

    jQuery already has script loading routine.
    sync plugin updated to use jQuery.

commit 2dbdaee1f0e652b4115727dc7033d6a6f15a75d8
Author: johndoe <[email protected]>
Date:   Tue Jul 2 11:28:23 2019 +0300

    basemap-yandex: make use of updated L.Yandex

    refactor; simplify plugin structure; shorten namespace;
    Yandex API loading is now deferred till layer is actually used
    load.js is not needed anymore

commit e2dcc9540a7063296426b89627b07791f217fc49
Author: johndoe <[email protected]>
Date:   Tue Jul 2 10:41:34 2019 +0300

    external: Yandex.js update to efd0a870496fa55fd51904fff781b6d214e09fa6

    https://github.com/shramov/leaflet-plugins/pull/285
    https://github.com/shramov/leaflet-plugins/pull/295

    new script Yandex.addon.LoadApi.js to help with deferred Yandex JS API loading.

commit 033894b00ee6ca9b3119c4b88e7751d4a5ca1b8d
Author: Hubert Zhang <[email protected]>
Date:   Tue Sep 3 19:22:52 2019 +0800

    Use new lambda function to suppress code

commit c7be0aba63ce78b914af3601058bea1d65574233
Author: Alexander Danilov <[email protected]>
Date:   Mon Apr 15 13:38:12 2019 +0300

    IITC-Mobile: Support Facebook authorization

commit ead5a8af657f611597bf76a62e9373c3fc8dbc01
Author: Alexander Danilov <[email protected]>
Date:   Mon Apr 15 13:25:49 2019 +0300

    Apply a style to the login form. Correcting the display of buttons in the mobile version. #160

commit d98ec5988922cb65ec713d3853086ed0b6efc692
Author: Alexander Danilov <[email protected]>
Date:   Mon Apr 15 13:24:41 2019 +0300

    Fix TypeError when user is not logged in #163

commit 8a4ac0c8dce2df37d7e910b0e6ab85bec37c0c4f
Author: johndoe <[email protected]>
Date:   Fri Aug 30 18:05:34 2019 +0300

    smartphone.js: cleanup after window.requestFile

    * remove service script from DOM
    * remove service function window.onFileSelectedXX after it is executed
    * minor refactoring

commit dadae7a76d1f67c7da0c6c192d4971209704f100
Author: johndoe <[email protected]>
Date:   Tue Jul 30 14:21:34 2019 +0300

    boot.js: fix layerChooser.getLayers

    `layerId` meant to be number
    (there was unintended change during adaptation to leaflet 1)

commit 9fbc164b303f2b756a45dc5e3ac655b17f4b4784
Author: johndoe <[email protected]>
Date:   Fri Jul 12 17:02:33 2019 +0300

    boot.js: fix portal preview dialog was not centered

    dialog with preview did not fit the screen because wasn't properly centered

    Fixed by passing img node with dimensions specified

commit f0e8ad7c3b7f776316fc09721b8aa5e26ce2b9c6
Author: johndoe <[email protected]>
Date:   Fri Jul 12 16:36:15 2019 +0300

    boot.js: minor fix in setupLargeImagePreview: there are no details

    I do not know what that 'details' meant to be.
    May be there are were some, but we lost them long time ago.

commit 40f418d90536b8505ae4f860d1bfb727bdda5335
Author: johndoe <[email protected]>
Date:   Fri Jul 12 16:33:36 2019 +0300

    boot.js: refactor setupLargeImagePreview a bit

commit 18a7728a9631130ac721e7d23b4865f044109654
Author: johndoe <[email protected]>
Date:   Fri Jul 12 16:26:03 2019 +0300

    boot.js: fix title of imgpreview window

    jQuery .text() method uses Node.textContent, but we need innerText here
    https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText

    fix #215

commit c3744251b7f70e83c6e505110fe11759a777e43e
Author: johndoe <[email protected]>
Date:   Thu Jul 11 13:11:57 2019 +0300

    missions: make use of portalRemoved hook

    instead of Object.observe (obsolete) or monkey-patching iitc internals

commit 896fe03a5579e9c475e3d7bbc07d21f96d2439fb
Author: johndoe <[email protected]>
Date:   Wed Jul 10 19:04:16 2019 +0300

    missions: fix exception in onWaypointsRefreshed/onMissionsRefreshed

    context was lost

    also: (in 1 place) in forEach replace bind with thisArg parameter, for consistency

commit 2dd4a0340f0a13fec431b16e886c751bfb2b4ed0
Author: johndoe <[email protected]>
Date:   Sun Jun 23 20:50:40 2019 +0300

    utils_misc.js: fix bug in escapeHtmlSpecialChars

    The bug does not appear in most cases, considering `div` as `'undefined'`
    (resulting in valid <undefined></undefined> element)

    Seems that some browsers behave differently, causing exception
    fix #211

commit 604e47049b26fd6b135939b6595f21d70abba524
Author: johndoe <[email protected]>
Date:   Mon May 6 10:16:43 2019 +0300

    utils_misc.js: fix removeLayerGroup

    Never arises because the "_leaflet_id" was equal to the entry in the layerchooser.
    This is no longer the case in leaflet 1+

commit e41e6489c66f78cac2934ed2cc24d1619e46a4c5
Author: johndoe <[email protected]>
Date:   Wed Sep 4 12:01:44 2019 +0300

    Consistent errors throwing

    Now using `throw new Error('message')`
    fix #191

    Note:
    For easy merging, some parts are left for #157 (utils_misc.js), #164 (main.js), #205 (hooks.js)

commit a739fd722fee3841ebea819714ba9362c6d241d2
Author: Hubert Zhang <[email protected]>
Date:   Sat Aug 31 16:24:12 2019 +0800

    Move ui update out of UpdateScript

commit 951f1bcb16ed43ad58e51b4417fd1a44474c637e
Author: Hubert Zhang <[email protected]>
Date:   Sat Aug 31 01:09:14 2019 +0800

    Check return code when update scripts, fix #210 part 2

commit 05b3d73278e8d1df66142efc9d76a0e186de42fe
Author: johndoe <[email protected]>
Date:   Mon Jun 10 16:11:12 2019 +0300

    basemap-bing: make use of updated L.BingLayer

commit ae50e2499554e215edd389c78518f30b40079fae
Author: johndoe <[email protected]>
Date:   Mon Jun 10 15:43:38 2019 +0300

    external: Bing.js update to a1f517a9d78c18c04ae8d9f59264b4e61fb319d1

    new script Bing.addon.applyMaxNativeZoom.js

    https://github.com/shramov/leaflet-plugins/pull/288
    https://github.com/shramov/leaflet-plugins/pull/290

commit aa62eb984501ba1302cc0aa8fda4234401b7cb38
Author: johndoe <[email protected]>
Date:   Fri Jun 7 19:17:21 2019 +0300

    basemap-bing: refactor, update with actual Bing parameters

    * simplify plugin structure
    * expose all options for customization
    * update to use actual imagery sets and related options (maxNativeZoom)
    * add CanvasDark layer

commit ad17cd2d8ed127f78089bce4cbd2d93842bb5c0e
Author: johndoe <[email protected]>
Date:   Fri Jun 7 18:50:00 2019 +0300

    basemap-bing: revert redundant dynamic layers creation (aae16d2c1b7a12b700de936ced699cf16d473efe)

    as metadata not requested until layer add (see L.BingLayer sources)

commit 339e1471e9ad73e14322725330d17476a678bcc2
Author: johndoe <[email protected]>
Date:   Thu May 16 19:52:29 2019 +0300

    overlay-kml: refactor; enhance in many ways;

    * fix try/catch blocks
    * simplify plugin structure
    * expose all options for customization
      - fileSizeLimit increased to 4096
    * styling: KML is now styled!
      - by default support 'simplestyle' used by toGeoJSON for KML
        but it's now easy to use arbitrary custom styling functions (see recommended sources in comments).
        Former style function is left commented out in code, as a sample
      - simplestyle defaults can be overriden
    * markers:
      - size is customizeble now
      - can be styled in any color (use SVG intead of png)
      - added sample for using CircleMarker (much faster with large amounts of markers due Canvas rendering)
      - KML icons are supported
    * tooltips:
      - show tooltip/popup for every feature that has 'title'/'description' property
      - added sample to show permanent labels
        N.B. for KML with a lot of features labels also need some special styling to reduce cluttering and overlapping
    * handlers:
      - user can add/remove/customize functions executed for every loaded file.
      - some handlers predefined:
        + add loaded file to layer chooser
        + on every new file - remove the previous (it stays available in layer chooser)
        + assign tooltips and popups
      - see more samples in comments

commit 0081528ede1375a43a69170801dcd0d471d192f3
Author: johndoe <[email protected]>
Date:   Sat May 18 17:10:00 2019 +0300

    styles.css: more specific svg styles

commit 1775a7278bd4e7856a3009082267f064c8fff711
Author: johndoe <[email protected]>
Date:   Thu May 9 12:37:12 2019 +0300

    external: leaflet-src.js update to 1.5.1

commit b70557d6edfd8486444e295c9e0d4427e914981a
Author: johndoe <[email protected]>
Date:   Sun Apr 28 14:42:24 2019 +0300

    external: update jQuery core to 3.4.1

    https://code.jquery.com/jquery-3.4.1.min.js

commit d1652a76cd35c53f91b2bdc494062af6dc95053b
Author: johndoe <[email protected]>
Date:   Fri Apr 19 12:48:13 2019 +0300

    tidy-links: refactor for more advanced customization abilities

    e.g.: https://github.com/iitc-project/ingress-intel-total-conversion/issues/340

commit 243b1b55cee8c26853b32e20ce7f6270002395af
Author: johndoe <[email protected]>
Date:   Mon Apr 15 12:02:03 2019 +0300

    tidy-links: use Tooltip instead of DivIcon

    Tooltip is less intrusive as it hides on click

commit bcaf1b2e15518faf623796060a1d347fd35fe518
Author: johndoe <[email protected]>
Date:   Sat Mar 30 17:44:38 2019 +0200

    tidy-links: refactor

    * fix try/catch block
    * simplify plugin structure
    * Error marker
      - does not clear already drawn lines, instead marker is added to tidy-links layer
      - keep it on screen during map update (to avoid marker continuosly turning off and on)
    * simplify code here and there, remove excessive comments, style issues

commit 29db6a2be30b43f2100437632448bf81d45c964e
Author: johndoe <[email protected]>
Date:   Fri Apr 12 15:06:00 2019 +0300

    minimap: follow main map baselayer changes

    old behaviour is still available when `miniMap.clonebasemap = false;`

    N.B.: there was similar old PR: https://github.com/iitc-project/ingress-intel-total-conversion/pull/1137
          but new approach is much more reliable

commit 6d7265b26021f5c14daff8a6c39e60ac5f3ee49e
Author: johndoe <[email protected]>
Date:   Sun Mar 17 18:53:53 2019 +0200

    minimap: refactor

    * fix try/catch block
    * remove attribution
    * add some changeable properties to plugin namespace
      - `baselayer`
      - `options`
      - `MiniMap` instance object

    for customization it's possible to use additional plugin like this:

    ```custom-minimap.user.js
    // ==UserScript==
    // @name           IITC plugin: Mini map custom
    // @category       Custom
    // @version        0.1.0
    // @description    Customization of iitc minimap control
    @@METAINFO@@
    // ==/UserScript==

    @@PLUGINSTART@@

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

    function setup () {
      var miniMap = window.plugin.miniMap;
      if (!miniMap || !miniMap.options) { return; }
      miniMap.options.minimized = true;
      miniMap.baselayer = L.gridLayer.googleMutant({
        type: 'roadmap',
        maxZoom: 21,
        backgroundColor: '#0e3d4e',
        styles: [
          { featureType:"all", elementType:"all",
            stylers: [{visibility:"on"}, {hue:"#131c1c"}, {saturation:"-50"}, {invert_lightness:true}] },
          { featureType:"water", elementType:"all",
            stylers: [{visibility:"on"}, {hue:"#005eff"}, {invert_lightness:true}] },
          { featureType:"poi", stylers:[{visibility:"off"}]},
          { featureType:"transit", elementType:"all", stylers:[{visibility:"off"}] }
        ],
      });
    }

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

    @@PLUGINEND@@
    ```

commit 412beb2536cb87c3a42aea03b60a740692c8c94f
Author: johndoe <[email protected]>
Date:   Mon Mar 18 18:15:39 2019 +0200

    zoom-slider: fix css; refactor

    * add css to align with other leaflet controls
    * add changeable pan control `options` to plugin namespace
    * fix try/catch block
    * simplify plugin structure

commit bb690aec2b92f08144e7d24325b9de7de21ddf23
Author: johndoe <[email protected]>
Date:   Mon Mar 18 17:42:44 2019 +0200

    pan-control: fix css; refactor

    * add css to align other leaflet controls with the pan control
    * add changeable pan control `options` to plugin namespace
    * 'prevent Pancontrol from being activated by default' is not needed for current version
    * fix try/catch block
    * simplify plugin structure

commit f401c41eb90c71f3a6141688cbf6ba36cd0fc4c2
Author: johndoe <[email protected]>
Date:   Wed Mar 20 13:16:07 2019 +0200

    draw-tools: refactor (fix try/catch blocks)

commit fdb389601a07419ec5947db0f9bf97935ed89a7c
Author: johndoe <[email protected]>
Date:   Wed Mar 13 16:14:37 2019 +0200

    external: versions.md

    Document all upstream externals in versions.md.
    * Url to repo
    * Version tag/hash of repo (using `git describe`)
    * Main file name + rev hash
    * IITC customization of code

commit 487795ad7d3bc44c78782ac943cf7a57ab1340c9
Author: johndoe <[email protected]>
Date:   Wed Mar 13 14:12:16 2019 +0200

    external: load all in single place

commit 89a840cc6e0629d9e8a9e52025491e7a1ef1b261
Author: johndoe <[email protected]>
Date:   Wed Mar 13 13:07:11 2019 +0200

    external: delaunay.js update to dfc747e3dc850c928d720bcdf2a93c42d5a42712 (1.0.1-4-g6de2b4f)

    tidy-links plugin fixed to comply with changed api

commit 37ef63fe6aeba92d72e59cec22df351f5ab5ebee
Author: johndoe <[email protected]>
Date:   Wed Mar 13 12:29:14 2019 +0200

    external: autolink-min.js update to c5df674c2da6ca7e26d47e2b05abafd28262f0a8 (1.0.2-4-g1418049)

    autolink.js -> autolink-min.js (just rename as old version already was minified)

commit c2cd7109cf8ad1d51014a1437278bcf479260d97
Author: johndoe <[email protected]>
Date:   Wed Mar 13 12:00:45 2019 +0200

    external: L.Control.Zoomslider.js update to 061a7455fa8a49961363ba63d9811be01989c093 (v0.7.1-6-ga6bab54)

    L.Control.Zoomslider.css
    L.Control.Zoomslider.js

commit 28b7285f5b53c3986cffd2b89e68882d364d8e70
Author: johndoe <[email protected]>
Date:   Wed Mar 13 11:54:04 2019 +0200

    external: L.Control.Pan.js update to d9528ed95479d97d92828c19fa521aa2613aff09 (v0.7.1-4-g272329d)

    L.Control.Pan.css
    L.Control.Pan.js
    images/
      pan-down.png
      pan-left.png
      pan-right.png
      pan-up.png

    plugin pan-control: use @@INCLUDECSS macro

commit 7343576376b36f3a510cd639192003cfe2686162
Author: johndoe <[email protected]>
Date:   Mon Apr 8 12:39:13 2019 +0300

    external: Control.MiniMap.js: toggle.svg: minified

    https://github.com/Norkart/Leaflet-MiniMap/pull/146

commit 302fd6fa724d0270ec4b12e251cf98d9a251b119
Author: johndoe <[email protected]>
Date:   Wed Mar 13 11:25:30 2019 +0200

    external: Control.MiniMap.js update to 30eff5568645bf2bdab86b9e2d8fa6b459a33966 (v3.6.1-4-gf5bfff8)

    Control.MiniMap.css
    Control.MiniMap.js
    images/
      toggle.png
      toggle.svg

    plugin minimap: use @@INCLUDECSS macro

commit 666bbd2a12fb2bb18b61a46eeefb76240d029dd8
Author: johndoe <[email protected]>
Date:   Thu Mar 21 11:59:57 2019 +0200

    external: KML.js never used

commit cfb806bed2a93e959c6ca603b6b510d0b5dbbfcf
Author: johndoe <[email protected]>
Date:   Wed Mar 13 10:52:11 2019 +0200

    external: togeojson.js update to 72957d69545ed1f798d56618694473b603a0ba6f (v0.16.0-27-g72957d6)

    N.B.:
      Previously there was small customization:
      https://github.com/iitc-project/ingress-intel-total-conversion/pull/1139
      1641fd5727c5fab75547b21462785b600738804e
      I do not think that we should keep it nowadays.
      (at least I am unable to reproduce original issue with google-generated KML)

commit 04a47dfd00fe6b376f759965ef3563e1e4a8921f
Author: johndoe <[email protected]>
Date:   Wed Mar 13 10:31:39 2019 +0200

    external: leaflet.filelayer.js update to 8fcbf4117a9d004485a2ba309b7f43bdb6334221 (1.2.0-3-g47e9812)

    overlay-kml refactored (and simplified) to comply with updated leaflet.filelayer.js

    N.B.:
      There was customization:
      https://github.com/iitc-project/ingress-intel-total-conversion/pull/727
      a172b288da7a4fb5f76c11a751d34d8bdfc43ced + 45b1691f3e3fcfed7f035e02d5e39dcf3f9a49a6
      But it's absolutely no need to patch upstream sources as we can do it in plugin itself.

commit 7162118464050f6ee007213467011d078bba27ff
Author: Hubert Zhang <[email protected]>
Date:   Sat Aug 31 00:47:04 2019 +0800

    Fix script parsing error, fix #210

commit cb6cb7712875511c919759a651b0d144509c2b5f
Author: johndoe <[email protected]>
Date:   Mon May 20 18:29:55 2019 +0300

    plugins: extend portal-list uniformly

    remove redundant code trying to wait for `window.plugin.portalslist` namespace
    (in fact, on setup phase ALL plugins namespaces should be already available)

commit 3fa16bf711df6bcf99cb1b51dab2c94e6ab5ca1d
Author: johndoe <[email protected]>
Date:   Mon May 20 18:15:13 2019 +0300

    sync: use `setup.priority = 'high'`

    no need for 'iitcLoaded' hook (in several plugins)

commit ee6f2a6699e53d2cab03ee496ecc26d01710d5f4
Author: johndoe <[email protected]>
Date:   Mon May 20 16:40:00 2019 +0300

    hooks.js: remove VALID_HOOKS checking; replace pluginCreateHook with stub

    It've not made much sense, and misused:
    - several plugins was accessing window.VALID_HOOKS directly (instead of pluginCreateHook)
    - creating hooks for foreign plugin is nonsense anyway:
      https://github.com/iitc-project/ingress-intel-total-conversion/issues/1248
      (used widely)

commit 815d53e7f38ceebd0d6d53ac329eac278a7855f9
Author: johndoe <[email protected]>
Date:   Mon May 20 01:54:04 2019 +0300

    boot.js: plugins priority control

    priority can be specified as `setup` property:
    setup.priority = 'high' // 'low'
    - 'normal': default, usually omitted
    - 'high': for service plugins, or for early customization
    - 'low': useful for plugins post-customization
    - other values are reserved

    other:
    - include plugin name in 'error starting plugin' message
    - utils_misc.js: refactor 'About IITC'
      - sort plugins by name
      - show description in tooltip
      - hilite non-standard plugins
      - strikethrough plugins failed to start (see error message in tooltip)
      - clean up description and version fields (remove dateTimeVersion component)
      - other enhancements

      Note: 'IITC plugin: ' part is removed from name field.
      It's case-sensitive! (fixed in a couple of plugins)

commit a6c4496eadb6b34dd24ba8db0deeec9fb20e74a1
Author: johndoe <[email protected]>
Date:   Wed Mar 13 10:13:14 2019 +0200

    external: Shramov leaflet-plugins update to 3.0.3

    * Bing.js update to 14b845bba7f6e7bc0309f37c66f59bceb801bb68
    * Yandex.js update to 21998f069d00952807ae070fb5b5c9992e7a6c1f
    * KML.js update to 73b690acbdd95091e2a50456d3a99437dd120055

commit e249e15ef30111684e0d8138eb9f66c469395117
Author: johndoe <[email protected]>
Date:   Tue Mar 12 17:47:08 2019 +0200

    external: spectrum.js update to 1d9835b239869d90bf8d3555641d1f7e9cea1f71 (1.8.0-24-g9e04e58)

commit 4d755be88281dba36f33dd466ce2ec2440cd6972
Author: johndoe <[email protected]>
Date:   Tue Mar 12 17:42:55 2019 +0200

    external: spectrum.js: get rid of unneeded subdirectory

commit 84654417e61713678000937ffaae41be7bd13b6e
Author: johndoe <[email protected]>
Date:   Tue Mar 12 17:32:30 2019 +0200

    external: taphold.js update to 392d42e59b6494d6ec6a9fe3cc4ac3e43bf207dd

    * update to latest upstream: https://github.com/richadams/jquery-taphold/commit/b59ed509a64080f4fd7c894fa7de83ceb92851e0
    * upstream repo is archived now, so setup own fork: https://github.com/IITC-CE/jquery-taphold
    * update to comply with recent jQuery

commit 07948e01b2bf63e330f806f4ed18823df90682fd
Author: johndoe <[email protected]>
Date:   Sun Mar 17 15:20:14 2019 +0200

    build.py: support *.svg in @@INCLUDEIMAGE

    For use in @@INCLUDECSS and instead of @@INCLUDESVG (#62).

commit 984ec5becd3319c87d536b2ad1d0f597ecfd60b9
Author: johndoe <[email protected]>
Date:   Wed Mar 13 17:35:10 2019 +0200

    build.py: @@INCLUDECSS strips quotes from image filenames

    Both single- and doublequtes
    Refactor to dequote before MultiLine transform

    Note: may be better use function instead of RE

    ```
    def dequote(fn):
        if fn.startswith(("'", '"')) and (fn[0] == fn[-1]):
            return fn[1:-1]
        return fn
    ```

commit 4b6669bf0f96251ff64c1e37e05c2bce95b9a9be
Author: johndoe <[email protected]>
Date:   Tue Aug 6 13:35:32 2019 +0300

    build.py: put every module in separate IIFE

    this is the 1st step to isolate modules without applying namespace to
    every single private function (ough!)

commit c4c08c4b06785a41426a3d2d29258f2f7b4a67e9
Author: Nipheon <[email protected]>
Date:   Sat Aug 3 07:17:41 2019 +0200

    Remove angled brackets

    Remove ornaments that are not needed and are annoying when copy&pasting into other map apps

commit 27fa41b08ce7ae56f96e58fb25a23100526d95b6
Author: johndoe <[email protected]>
Date:   Sat Jul 6 14:22:45 2019 +0300

    artifacts.js: id for Artifacts item in toolbox

    can be used e.g to hide item if it's not needed

commit de1e2f8f5b22ec8678a72e6b7d0bbdd45fff401e
Author: johndoe <[email protected]>
Date:   Sat Jul 6 13:35:02 2019 +0300

    artifacts.js: remove confusing message from dialog

    it used to be helpful when that news were new
    now it is confusing, especially when no artifacts shown.
    see https://github.com/IITC-CE/ingress-intel-total-conversion/issues/138

commit 0cbe93e6b92bc804be3bd1f3c57a28539c28040c
Author: johndoe <[email protected]>
Date:   Mon Jul 8 17:04:45 2019 +0300

    scoreboard: plugin rewritten

    plugin is almost 2 times smaller now
    placeholders portals do not affect avg values now (their count is shown separately, in brackets)
    table: rearranged to be more compact

commit ef1e57ab8349b852fca29973dfa6fbef005cb266
Author: johndoe <[email protected]>
Date:   Sun Jul 7 15:15:49 2019 +0300

    scoreboard: prompt to zoom in only when needed

    cause it cannot be more accurate than on zoom 15

commit feba2b657e5467adf57c4f6bbf6b242c3ef8fd53
Author: johndoe <[email protected]>
Date:   Sun Jul 7 15:12:09 2019 +0300

    scorboard: fix: didn't work on mobile

    `onPaneChange` function never existed
    the bug was there from the initial commit

    todo: pick better icon

commit 473f57b810a1e987beba4c6f805f1cc6566888c3
Author: johndoe <[email protected]>
Date:   Sun Jul 7 15:11:01 2019 +0300

    scoreboard: fix code style

commit 1e7766ae1388c67d620b38d8e9e7e9c296ee7078
Author: johndoe <[email protected]>
Date:   Wed May 8 11:30:46 2019 +0300

    external: leaflet.draw-src.css: fix draw-toolbar icons alignment

    https://github.com/Leaflet/Leaflet.draw/pull/927

commit 44558eec85a9e41779b4beb45e7a936c52685312
Author: johndoe <[email protected]>
Date:   Sat May 4 13:31:51 2019 +0300

    Revert "Reducing control elements of draw tools. The touch mode was always on."

    This reverts commit 7941ed7e2b21fec28ec083e7bf8999c74e43e492.
    (using another workaround, see previous commit)

commit f5dde31de74c3f16e614c2bd89cdfae95c89b517
Author: johndoe <[email protected]>
Date:   Sat May 4 13:30:19 2019 +0300

    boot.js: Leaflet: prevent mobile style on desktop

    After upgrading Leaflet to v1 we get mobile-styled controls in desktop
    Chrome/Opera/etc.

    Background info: https://github.com/nrenner/brouter-web/issues/69

    I am pretty sure that Leaflet behavior (at least) is not completely right.
    The simplest method would be to just remove `leaflet-touch` style from `#map` div.

    Unfortunately out there is other code (e.g. in `L.Draw`) using
    `L.Browser.touch` property directly, so I propose to disable it.

    Edit: actually it is not webkit-specific anymore, as I observe the same in Firefox.

commit 082147bc5b4a1fd6956174dd9823194bf2346924
Author: johndoe <[email protected]>
Date:   Thu Jul 4 11:59:18 2019 +0300

    utils_misc.js: mark setPermaLink and androidPermalink as deprecated

    too specific actions to have public api functions for them
    (main.js need to be refactored before we can get rid of them)

commit 5e93870ecf36f32f4c0650a212c479171dabfaca
Author: johndoe <[email protected]>
Date:   Mon May 13 11:26:05 2019 +0300

    refactor to use common function window.makePermalink (utils_misc.js)

commit 85d5443d7ccade0d8bc0d30e69f99d956f3321ad
Author: Alexander Danilov <[email protected]>
Date:   Thu Jun 27 11:55:02 2019 +0300

    Fix of the first synchronization

commit d55a4ae9b2d69c41eb5be73453aa75d63bc075b1
Author: Alexander Danilov <[email protected]>
Date:   Thu Jun 27 10:37:06 2019 +0300

    Change the display of the change log. Only the last message is shown for each synchronized file.

commit 4cca73541825f5f9b7c1c3c99dd0370f742e4129
Author: Alexander Danilov <[email protected]>
Date:   Thu Jun 27 10:29:54 2019 +0300

    Removed an unnecessary timer that duplicates a repeated connection attempt in case of a network error

commit d4846a6296c7b538001c51df984800c130a09c57
Author: Alexander Danilov <[email protected]>
Date:   Thu Jun 27 10:28:12 2019 +0300

    Fix Sync of uniques #165

commit 04a49037872dd5d30917e7b421f6740444016be1
Author: johndoe <[email protected]>
Date:   Wed May 15 19:30:40 2019 +0300

    map_data_debug.js: change some options to more reasonable values

    * RenderDebugTiles.CLEAR_CHECK_TIME: smoother animation (and no need to depend on canvas)
    * RenderDebugTiles.FADE_TIME: no need to animate so long
    * rectangles weight: neater when thin
      (todo: expose this and other options to be changeable in plugin)

commit cc64bcdcf9256faab769e28db63b6e2e49f31ff1
Author: johndoe <[email protected]>
Date:   Wed May 15 18:03:34 2019 +0300

    boot.js: reintroduce possibility to not prefer canvas; fix old L.Path.CANVAS references

    1. Currently we have `preferCanvas` by default.
       Still, we might need to set it to false for debug purposes.
       It's possible with `window.PREFER_CANVAS` setting
       (could be set by some plugin, before `setup`)
    2. Fix L.Path.CANVAS is not in Leaflet 1.x
       Use `map.options.preferCanvas` instead.

commit 1d033db115424a4b30843aa7ece0622ee68c8e2d
Author: johndoe <[email protected]>
Date:   Fri May 3 17:43:55 2019 +0300

    boot.js: fix CLIP_PADDING

    L.Path.CLIP_PADDING is not used in Leaflet 1.x

    - use Renderer option instead
    - use same value both for Canvas and SVG
      it currently doesn't make much sense to customize them separately
    - set padding to `1` for desktop, `0.5` for mobile (compromise value to lower memory usage)
      Stock intel behaves more closely to `1`

    This value can be overriden by option `window.RENDERER_PADDING`
    (need to be set in some plugin, before `setup`)

    Fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/184

commit ad1db7d7cbee5a13859028a880718e3371813498
Author: johndoe <[email protected]>
Date:   Wed May 22 11:11:02 2019 +0300

    Revert "external: leaflet.draw-src.js: workaround for https://github.com/Leaflet/Leaflet.draw/issues/789 (Can only draw two-point polygons in Chrome w/ Touch)"

    This reverts commit 2d4a67d08d465e25a64b5b52c8dd45ec17f0046b.

commit 9f0645822c83fb2c42d0b79c3ee065af508d6208
Author: johndoe <[email protected]>
Date:   Wed May 22 11:10:15 2019 +0300

    Revert "draw-tools: decrease number of Leaflet.draw touch bugs workarounds"

    This reverts commit b791a715e35a140240f7599ceb93dfc0720d6b0a.

    https://github.com/IITC-CE/ingress-intel-total-conversion/pull/175#issuecomment-494566708

commit 3fd65a327c1d1eaa1b6f3dfaa92c1b41289e4a0d
Author: johndoe <[email protected]>
Date:   Sat May 18 19:53:27 2019 +0300

    boot.js: do not try to detect badPlugins

commit 3d31e49a82d5284cd774d31b1f95b8eb49b64bdc
Author: johndoe <[email protected]>
Date:   Fri May 10 11:18:49 2019 +0300

    external: L.Geodesic.js: add workaround to fix GeodesicCircle drawing/editing process

    fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/178
    upstream report: https://github.com/Leaflet/Leaflet/issues/6656

commit b791a715e35a140240f7599ceb93dfc0720d6b0a
Author: johndoe <[email protected]>
Date:   Thu May 9 12:13:47 2019 +0300

    draw-tools: decrease number of Leaflet.draw touch bugs workarounds

commit 22f787cbaf0e8d9a9019af1c05ef280f47acdb54
Author: johndoe <[email protected]>
Date:   Thu May 9 12:10:08 2019 +0300

    external: leaflet.draw-src.js: fix https://github.com/Leaflet/Leaflet.draw/issues/922 (Unable to cancel Rectangle and Circle drawing in Chrome w/Touch)

    adapted from https://github.com/Leaflet/Leaflet.draw/pull/930

commit 2d4a67d08d465e25a64b5b52c8dd45ec17f0046b
Author: johndoe <[email protected]>
Date:   Thu May 9 12:07:56 2019 +0300

    external: leaflet.draw-src.js: workaround for https://github.com/Leaflet/Leaflet.draw/issues/789 (Can only draw two-point polygons in Chrome w/ Touch)

    Although the source of the issue is somewhere deeper, it seems that just
    commenting out these 2 lines is enough to solve it.

    I observe no functionality loss with this change, perhaps the code was redundant
    for some unclear reason.

    Adapted from https://github.com/Leaflet/Leaflet.draw/pull/926

commit 6ea92c6b639c4f1010a99b1de49db98ec336ff47
Author: johndoe <[email protected]>
Date:   Thu Apr 25 15:23:49 2019 +0300

    draw-tools: fix mobile-related bugs; add Circle again

    fix https://github.com/iitc-project/ingress-intel-total-conversion/issues/1294
    fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/178
    [untested] fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/162

    upstream report: https://github.com/Leaflet/Leaflet.draw/issues/923

    workarounds for touch bugs: https://github.com/Leaflet/Leaflet.draw/issues/789

commit ae613319f5c540f31127c680cab994cf45650350
Author: johndoe <[email protected]>
Date:   Wed May 1 17:08:00 2019 +0300

    ornaments.js: refactor (continue)

commit cf61e9b28ef560ab610e68fac56316b3bb9f474d
Author: johndoe <[email protected]>
Date:   Wed May 1 16:55:11 2019 +0300

    ornaments.js: refactor to single object

    unused `ornaments.isInterestingPortal` removed

commit 5d312dd932f4fc6e886b02ce54444c96b337c29d
Author: johndoe <[email protected]>
Date:   Wed May 1 16:32:38 2019 +0300

    ornaments.js: refactor

    - shorten `window.ornaments` references
    - style: use single quote, reformat long line

commit b45cba1db25ce0fb01f86337f3608e313ebdb0e7
Author: johndoe <[email protected]>
Date:   Wed May 1 16:27:00 2019 +0300

    ornaments.js: fix: do not process portals with 0 ornaments

commit 0dd899304a338d6f4d08bc83dae9a089601724c6
Author: johndoe <[email protected]>
Date:   Fri Apr 26 18:11:22 2019 +0300

    external: leaflet.draw-src.js minor optimisation

    L.Edit.Circle._getResizeMarkerPoint: make use of known implementation details

commit f921f8f5ff3384ba88c82f93ce19bd1268e4ff9f
Author: johndoe <[email protected]>
Date:   Fri Apr 26 12:49:06 2019 +0300

    external: leaflet.draw-src.js fix: return some Geodesic Circle customization

    It was still present in https://github.com/McBen/ingress-intel-total-conversion/commit/721b7587c9b180f7de37d699fedc648abaed42de#diff-faf274517d8a5af6178bf8dbb31c682a
    but lost later

    Fix https://github.com/IITC-CE/ingress-intel-total-conversion/issues/174

    P.S.
    We could get rid of magic numbers in `L.Edit.Circle._getResizeMarkerPoint`:
    ```
    		// make use of https://leafletjs.com/reference-1.4.0.html#latlng-tobounds
    		var bounds = latlng.toBounds(this._shape.getRadius() * 2);
    		return L.latLng(bounds.getNorth(), latlng.lng);
    ```

commit 7151b4f3d83f29d70423232e1f581dbfe32002fb
Author: johndoe <[email protected]>
Date:   Sat Apr 20 11:10:19 2019 +0300

    bookmarks: fix #166: Bookmarks reorder error

    todo: refactor all jQuery code in bookmarks plugin as it's really messy

commit 83184325350d112ea60a2b3dce673aef1f3a1711
Author: johndoe <[email protected]>
Date:   Mon Apr 8 17:44:20 2019 +0300

    scale-bar: improve alignment with other controls; refactor

    - was: custom (imperfect) css, so in desktop we get scale-bar overlapped with highlihgts control
      now: scale-bar is positioned by leaflet css, we only care to move it on first position
    - simplify plugin structure

commit 55c52bcbf2f57a2d201443033379f748ea4463f0
Author: johndoe <[email protected]>
Date:   Mon Apr 8 13:35:41 2019 +0300

    layer-count: fix #149 (error accessing private property)

    In Canvas mode there is no such property
    N.B. removed code is excessive in SVG mode too (since leaflet >1)

commit 9351c51617c34f3d707b7273d10a40ed86084147
Author: johndoe <[email protected]>
Date:   Mon Apr 8 13:31:13 2019 +0300

    cache-portals-on-map: fix #103: TypeError while running hook mapDataEntityInject

    hook should not be processed further on failure

commit cfc1c6fef9875a834454d8aae3dc3ce91a3d3df7
Author: johndoe <[email protected]>
Date:   Sat Mar 9 13:28:46 2019 +0200

    flat shadows (keys-on-map, regions, portal-names, portal-levels)

commit 1a27ed95f9ca6859c6d27abf63f756474c2dd28e
Author: johndoe <[email protected]>
Date:   Thu Feb 28 12:43:52 2019 +0200

    fixPortalImageUrl: panoramio is gone

commit 9d104eeb26aea9eef2900b70ed3b9434ab3d0ab6
Author: johndoe <[email protected]>
Date:   Wed Feb 27 16:59:39 2019 +0200

    keys-on-map: softer number shadows

commit 2db3f8aadb84c750a94211d523e1beeb96cbe8a9
Author: johndoe <[email protected]>
Date:   Tue Feb 26 18:06:39 2019 +0200

    regions: softer cells labels shadows

commit 2e73ed3e9bcc7b7c2843bb8bf6c8f5b9ae4ac16f
Author: johndoe <[email protected]>
Date:   Fri Feb 15 12:04:17 2019 +0200

    portal-names: multiline overflow with '...'

    Webkit-only solution for now
    More: https://css-tricks.com/almanac/properties/l/line-clamp/

commit fac8c98a705ba2b65e74bd346ba0dc83d76bde67
Author: johndoe <[email protected]>
Date:   Fri Feb 15 12:02:21 2019 +0200

    portal-names: softer label shadows

    Previous looked dirty, especially on retina screens

commit 6d1f066a8c212a900e73a86dc311292eccbc07ce
Author: johndoe <[email protected]>
Date:   Fri Feb 15 12:00:03 2019 +0200

    portal-level-numbers: softer number shadows

    Previous looked dirty, especially on retina screens

commit 4de01f67f7235f5a2fb068b2da651a2d77ac7873
Author: johndoe <[email protected]>
Date:   Tue Feb 12 15:43:03 2019 +0200

    remove unused stuff
@MysticJay
Copy link
Contributor

As a PoC #445 implements all functions as local functions and explicitly exposes some of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development general development issue
Projects
None yet
Development

No branches or pull requests

3 participants