diff --git a/code/hooks.js b/code/hooks.js index b4959745..60eefe45 100644 --- a/code/hooks.js +++ b/code/hooks.js @@ -50,6 +50,10 @@ // iitcLoaded: called after IITC and all plugins loaded // portalDetailLoaded: called when a request to load full portal detail // completes. guid, success, details parameters +// paneChanged called when the current pane has changed. On desktop, +// this only selects the current chat pane; on mobile, it +// also switches between map, info and other panes defined +// by plugins window._hooks = {} window.VALID_HOOKS = [ @@ -60,7 +64,7 @@ window.VALID_HOOKS = [ 'publicChatDataAvailable', 'factionChatDataAvailable', 'requestFinished', 'nicknameClicked', 'geoSearch', 'iitcLoaded', - 'portalDetailLoaded']; + 'portalDetailLoaded', 'paneChanged']; window.runHooks = function(event, data) { if(VALID_HOOKS.indexOf(event) === -1) throw('Unknown event type: ' + event); diff --git a/code/panes.js b/code/panes.js index 4c3898d4..c5ea4eea 100644 --- a/code/panes.js +++ b/code/panes.js @@ -3,6 +3,8 @@ window.show = function(id) { window.hideall(); + runHooks("paneChanged", id); + switch(id) { case 'full': window.chat.show('full'); @@ -27,9 +29,6 @@ window.show = function(id) { case 'info': window.smartphone.sideButton.click(); break; - default: - window.smartphone.mapButton.click(); - break; } if (typeof android !== 'undefined' && android && android.switchToPane) { diff --git a/mobile/res/drawable-hdpi/ic_action_new_event.png b/mobile/res/drawable-hdpi/ic_action_new_event.png new file mode 100644 index 00000000..f01b43e4 Binary files /dev/null and b/mobile/res/drawable-hdpi/ic_action_new_event.png differ diff --git a/mobile/res/drawable-hdpi/ic_action_paste.png b/mobile/res/drawable-hdpi/ic_action_paste.png new file mode 100644 index 00000000..b7e1b554 Binary files /dev/null and b/mobile/res/drawable-hdpi/ic_action_paste.png differ diff --git a/mobile/res/drawable-hdpi/ic_action_star.png b/mobile/res/drawable-hdpi/ic_action_star.png new file mode 100644 index 00000000..7c3e1db9 Binary files /dev/null and b/mobile/res/drawable-hdpi/ic_action_star.png differ diff --git a/mobile/res/drawable-mdpi/ic_action_new_event.png b/mobile/res/drawable-mdpi/ic_action_new_event.png new file mode 100644 index 00000000..784ee03b Binary files /dev/null and b/mobile/res/drawable-mdpi/ic_action_new_event.png differ diff --git a/mobile/res/drawable-mdpi/ic_action_paste.png b/mobile/res/drawable-mdpi/ic_action_paste.png new file mode 100644 index 00000000..8eebda6c Binary files /dev/null and b/mobile/res/drawable-mdpi/ic_action_paste.png differ diff --git a/mobile/res/drawable-mdpi/ic_action_star.png b/mobile/res/drawable-mdpi/ic_action_star.png new file mode 100644 index 00000000..c9e12ac2 Binary files /dev/null and b/mobile/res/drawable-mdpi/ic_action_star.png differ diff --git a/mobile/res/drawable-xhdpi/ic_action_new_event.png b/mobile/res/drawable-xhdpi/ic_action_new_event.png new file mode 100644 index 00000000..ed693e51 Binary files /dev/null and b/mobile/res/drawable-xhdpi/ic_action_new_event.png differ diff --git a/mobile/res/drawable-xhdpi/ic_action_paste.png b/mobile/res/drawable-xhdpi/ic_action_paste.png new file mode 100644 index 00000000..56551c4b Binary files /dev/null and b/mobile/res/drawable-xhdpi/ic_action_paste.png differ diff --git a/mobile/res/drawable-xhdpi/ic_action_star.png b/mobile/res/drawable-xhdpi/ic_action_star.png new file mode 100644 index 00000000..e3291481 Binary files /dev/null and b/mobile/res/drawable-xhdpi/ic_action_star.png differ diff --git a/mobile/res/drawable-xxhdpi/ic_action_new_event.png b/mobile/res/drawable-xxhdpi/ic_action_new_event.png new file mode 100644 index 00000000..9d1b2e74 Binary files /dev/null and b/mobile/res/drawable-xxhdpi/ic_action_new_event.png differ diff --git a/mobile/res/drawable-xxhdpi/ic_action_paste.png b/mobile/res/drawable-xxhdpi/ic_action_paste.png new file mode 100644 index 00000000..cb7682cc Binary files /dev/null and b/mobile/res/drawable-xxhdpi/ic_action_paste.png differ diff --git a/mobile/res/drawable-xxhdpi/ic_action_star.png b/mobile/res/drawable-xxhdpi/ic_action_star.png new file mode 100644 index 00000000..f1e51a75 Binary files /dev/null and b/mobile/res/drawable-xxhdpi/ic_action_star.png differ diff --git a/mobile/res/layout/dialog_notice.xml b/mobile/res/layout/dialog_notice.xml new file mode 100644 index 00000000..ab75cd69 --- /dev/null +++ b/mobile/res/layout/dialog_notice.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/res/values/strings.xml b/mobile/res/values/strings.xml index 1babb023..e6e934f0 100644 --- a/mobile/res/values/strings.xml +++ b/mobile/res/values/strings.xml @@ -56,18 +56,26 @@ PERFORMANCE OF THIS SOFTWARE. ]]> - -
+ + How to use IITCm:

• Navigation: swipe from the left edge of your screen (or click the app icon) to evoke the Navigation Drawer. Click the app icon again to return to the map.

• Layers/Highlights: swipe from the right edge of your screen (or click the layer-chooser icon in the ActionBar) - to evoke the Layer Drawer]]> + to evoke the Layer Drawer

+ • You can add official plugins in the settings

+ • For external plugins please have a look at the FAQ]]>

• tap and hold a portal for a second
• tap on the left half of the status bar]]>
+ +
+ Some plugins (e.g. portals list and bookmarks) now appear in the navigation drawer for quick access.
+ They won\'t appear in the info pane any more.

+ Swipe from the left edge of your screen (or click the app icon) to seem them.]]> +
UI Misc @@ -140,6 +148,7 @@ Search Locations Address could not be opened Copied to clipboard… + Do not show again Map Share diff --git a/mobile/smartphone.css b/mobile/smartphone.css index be95476e..60c1109f 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -1,5 +1,4 @@ body { - background: #000; color: #fff; } @@ -81,7 +80,7 @@ body { } #sidebar, #chatcontrols, #chat, #chatinput { - background: #0B3351 !important; + background: transparent !important; } .leaflet-top .leaflet-control { @@ -199,19 +198,18 @@ body { padding: 5px; margin-top: 3px; margin-bottom: 3px; - border: 2px outset #0e3d4e; + border: 2px outset #20A8B1; } #toolbox > a { padding: 5px; margin-top: 3px; margin-bottom: 3px; - border: 2px outset #0e3d4e; + border: 2px outset #20A8B1; } #portaldetails .close { padding: 4px; - border: 1px outset #0e3d4e; + border: 1px outset #20A8B1; margin-top: 2px; - background: #0e3d4e; } diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_JSInterface.java b/mobile/src/com/cradle/iitc_mobile/IITC_JSInterface.java index 0222fbe9..93372fd1 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_JSInterface.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_JSInterface.java @@ -13,8 +13,6 @@ import android.widget.Toast; import com.cradle.iitc_mobile.IITC_NavigationHelper.Pane; import com.cradle.iitc_mobile.share.ShareActivity; -import java.util.Locale; - // provide communication between IITC script and android app public class IITC_JSInterface { // context of main activity @@ -96,7 +94,7 @@ public class IITC_JSInterface { public void run() { Pane pane; try { - pane = Pane.valueOf(id.toUpperCase(Locale.getDefault())); + pane = mIitc.getNavigationHelper().getPane(id); } catch (IllegalArgumentException e) { pane = Pane.MAP; } @@ -170,4 +168,25 @@ public class IITC_JSInterface { } }); } + + @JavascriptInterface + public void addPane(final String name, final String label, final String icon) { + mIitc.runOnUiThread(new Runnable() { + @Override + public void run() { + mIitc.getNavigationHelper().addPane(name, label, icon); + } + }); + } + + // some plugins may have no specific icons...add a default icon + @JavascriptInterface + public void addPane(final String name, final String label) { + mIitc.runOnUiThread(new Runnable() { + @Override + public void run() { + mIitc.getNavigationHelper().addPane(name, label, "ic_action_new_event"); + } + }); + } } diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_MapSettings.java b/mobile/src/com/cradle/iitc_mobile/IITC_MapSettings.java index 1e06f9e1..687aff13 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_MapSettings.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_MapSettings.java @@ -12,7 +12,6 @@ import android.widget.ArrayAdapter; import android.widget.CheckedTextView; import android.widget.ListView; import android.widget.Spinner; -import android.widget.TextView; import org.json.JSONArray; import org.json.JSONException; diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index dfda5290..3332f442 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -35,7 +35,6 @@ import com.cradle.iitc_mobile.IITC_NavigationHelper.Pane; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; -import java.util.Locale; import java.util.Stack; public class IITC_Mobile extends Activity implements OnSharedPreferenceChangeListener, LocationListener { @@ -415,8 +414,7 @@ public class IITC_Mobile extends Activity implements OnSharedPreferenceChangeLis } public void switchToPane(Pane pane) { - String name = pane.name().toLowerCase(Locale.getDefault()); - mIitcWebView.loadUrl("javascript: window.show('" + name + "');"); + mIitcWebView.loadUrl("javascript: window.show('" + pane.name + "');"); } @Override diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java b/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java index 87224326..79ce1b9f 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_NavigationHelper.java @@ -12,12 +12,14 @@ import android.preference.PreferenceManager; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout; import android.text.Html; +import android.text.method.LinkMovementMethod; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; +import android.widget.CheckBox; import android.widget.ListView; import android.widget.TextView; @@ -34,71 +36,9 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt // Makes the icon/title clickable // getActionBar().setHomeButtonEnabled(enabled); - private class NavigationAdapter extends ArrayAdapter { - public NavigationAdapter() { - super(mIitc, R.layout.list_item_selectable); - - add(Pane.MAP); - add(Pane.INFO); - add(Pane.FULL); - add(Pane.COMPACT); - add(Pane.PUBLIC); - add(Pane.FACTION); - - if (mPrefs.getBoolean("pref_advanced_menu", false)) { - add(Pane.DEBUG); - } - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - TextView view = (TextView) super.getView(position, convertView, parent); - Pane item = getItem(position); - if (item == Pane.MAP) { - view.setText("Map"); - } else { - view.setText(getPaneTitle(item)); - } - - int icon = 0; - switch (item) { - case MAP: - icon = R.drawable.ic_action_map; - break; - case INFO: - icon = R.drawable.ic_action_about; - break; - case FULL: - icon = R.drawable.ic_action_view_as_list; - break; - case COMPACT: - icon = R.drawable.ic_action_view_as_list_compact; - break; - case PUBLIC: - icon = R.drawable.ic_action_group; - break; - case FACTION: - icon = R.drawable.ic_action_cc_bcc; - break; - case DEBUG: - icon = R.drawable.ic_action_error; - break; - } - - if (icon != 0) { - view.setCompoundDrawablesWithIntrinsicBounds(icon, 0, 0, 0); - } - - return view; - } - } - - public static enum Pane { - COMPACT, DEBUG, FACTION, FULL, INFO, MAP, PUBLIC - } - - public static final int NOTICE_DRAWERS = 1 << 0; + public static final int NOTICE_HOWTO = 1 << 0; public static final int NOTICE_INFO = 1 << 1; + public static final int NOTICE_PANES = 1 << 2; // next one would be 1<<2; (this results in 1,2,4,8,...) private final IITC_Mobile mIitc; @@ -113,6 +53,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt private boolean mIsLoading; private Pane mPane = Pane.MAP; private String mHighlighter = null; + private int mDialogs = 0; public IITC_NavigationHelper(IITC_Mobile activity, ActionBar bar) { super(activity, (DrawerLayout) activity.findViewById(R.id.drawer_layout), @@ -136,32 +77,34 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt onPrefChanged(); // also calls updateActionBar() - showNotice(NOTICE_DRAWERS); + showNotice(NOTICE_HOWTO); } private void showNotice(final int which) { - if ((mPrefs.getInt("pref_messages", 0) & which) != 0) { - return; - } + if ((mPrefs.getInt("pref_messages", 0) & which) != 0 || (mDialogs & which) != 0) return; - String text; + int text; switch (which) { - case NOTICE_DRAWERS: - text = mIitc.getText(R.string.notice_drawers).toString(); + case NOTICE_HOWTO: + text = R.string.notice_how_to; break; case NOTICE_INFO: - text = mIitc.getText(R.string.notice_info).toString(); + text = R.string.notice_info; + break; + case NOTICE_PANES: + text = R.string.notice_panes; break; default: return; } - TextView message = new TextView(mIitc); - message.setPadding(20, 20, 20, 20); - message.setText(Html.fromHtml(text)); + final View content = mIitc.getLayoutInflater().inflate(R.layout.dialog_notice, null); + TextView message = (TextView) content.findViewById(R.id.tv_notice); + message.setText(Html.fromHtml(mIitc.getString(text))); + message.setMovementMethod(LinkMovementMethod.getInstance()); AlertDialog dialog = new AlertDialog.Builder(mIitc) - .setView(message) + .setView(content) .setCancelable(true) .setPositiveButton(android.R.string.ok, new OnClickListener() { @Override @@ -173,22 +116,29 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt dialog.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { - int value = mPrefs.getInt("pref_messages", 0); - value |= which; + mDialogs &= ~which; + if (((CheckBox) content.findViewById(R.id.cb_do_not_show_again)).isChecked()) { + int value = mPrefs.getInt("pref_messages", 0); + value |= which; - mPrefs - .edit() - .putInt("pref_messages", value) - .commit(); + mPrefs + .edit() + .putInt("pref_messages", value) + .commit(); + } } }); + + mDialogs |= which; dialog.show(); } - private void updateActionBar() { + private void updateViews() { int position = mNavigationAdapter.getPosition(mPane); if (position >= 0 && position < mNavigationAdapter.getCount()) { mDrawerLeft.setItemChecked(position, true); + } else { + mDrawerLeft.setItemChecked(mDrawerLeft.getCheckedItemPosition(), false); } if (mDesktopMode) { @@ -219,7 +169,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt if (mDrawerLayout.isDrawerOpen(mDrawerLeft)) { mActionBar.setTitle(mIitc.getString(R.string.app_name)); } else { - mActionBar.setTitle(getPaneTitle(mPane)); + mActionBar.setTitle(mPane.label); } } @@ -231,27 +181,28 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt } } + public void addPane(String name, String label, String icon) { + showNotice(NOTICE_PANES); + + int resId = mIitc.getResources().getIdentifier(icon, "drawable", mIitc.getPackageName()); + mNavigationAdapter.add(new Pane(name, label, resId)); + } + public void closeDrawers() { mDrawerLayout.closeDrawers(); } - public String getPaneTitle(Pane pane) { - switch (pane) { - case INFO: - return "Info"; - case FULL: - return "Full"; - case COMPACT: - return "Compact"; - case PUBLIC: - return "Public"; - case FACTION: - return "Faction"; - case DEBUG: - return "Debug"; - default: - return mIitc.getString(R.string.app_name); + public Pane getPane(String id) { + for (int i = 0; i < mNavigationAdapter.getCount(); i++) { + Pane pane = mNavigationAdapter.getItem(i); + if (pane.name.equals(id)) + return pane; } + throw new IllegalArgumentException("Unknown pane: " + id); + } + + public void hideActionBar() { + mActionBar.hide(); } public boolean isDrawerOpened() { @@ -268,7 +219,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt @Override public void run() { mIitc.invalidateOptionsMenu(); - updateActionBar(); + updateViews(); } }, 200); } @@ -278,7 +229,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt super.onDrawerOpened(drawerView); mIitc.getWebView().onWindowFocusChanged(false); mIitc.invalidateOptionsMenu(); - updateActionBar(); + updateViews(); mDrawerLayout.closeDrawer(drawerView.equals(mDrawerLeft) ? mDrawerRight : mDrawerLeft); } @@ -310,7 +261,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt public void onPrefChanged() { mDesktopMode = mPrefs.getBoolean("pref_force_desktop", false); - updateActionBar(); + updateViews(); } public void openRightDrawer() { @@ -321,37 +272,100 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt public void reset() { mPane = Pane.MAP; - updateActionBar(); + mNavigationAdapter.reset(); + updateViews(); } public void setDebugMode(boolean enabled) { - mNavigationAdapter.remove(Pane.DEBUG); // avoid duplicates - if (enabled) { - mNavigationAdapter.add(Pane.DEBUG); - } + mNavigationAdapter.reset(); } public void setHighlighter(String name) { mHighlighter = name; - updateActionBar(); + updateViews(); } public void setLoadingState(boolean isLoading) { mIsLoading = isLoading; - updateActionBar(); - } - - public void switchTo(Pane pane) { - mPane = pane; - - updateActionBar(); + updateViews(); } public void showActionBar() { mActionBar.show(); } - public void hideActionBar() { - mActionBar.hide(); + public void switchTo(Pane pane) { + mPane = pane; + + updateViews(); + } + + private class NavigationAdapter extends ArrayAdapter { + public NavigationAdapter() { + super(mIitc, R.layout.list_item_selectable); + + reset(); + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + TextView view = (TextView) super.getView(position, convertView, parent); + Pane item = getItem(position); + view.setText(item.label); + + if (item.icon != 0) { + view.setCompoundDrawablesWithIntrinsicBounds(item.icon, 0, 0, 0); + } + + return view; + } + + public void reset() { + clear(); + + add(Pane.INFO); + add(Pane.FULL); + add(Pane.COMPACT); + add(Pane.PUBLIC); + add(Pane.FACTION); + + if (mPrefs.getBoolean("pref_advanced_menu", false)) { + add(Pane.DEBUG); + } + } + } + + public static class Pane { + public static final Pane COMPACT = new Pane("compact", "Compact", R.drawable.ic_action_view_as_list_compact); + public static final Pane DEBUG = new Pane("debug", "Debug", R.drawable.ic_action_error); + public static final Pane FACTION = new Pane("faction", "Faction", R.drawable.ic_action_cc_bcc); + public static final Pane FULL = new Pane("full", "Full", R.drawable.ic_action_view_as_list); + public static final Pane INFO = new Pane("info", "Info", R.drawable.ic_action_about); + public static final Pane MAP = new Pane("map", "IITC Mobile", R.drawable.ic_action_map); + public static final Pane PUBLIC = new Pane("public", "Public", R.drawable.ic_action_group); + + private int icon; + public String label; + public String name; + + public Pane(String name, String label, int icon) { + this.name = name; + this.label = label; + this.icon = icon; + } + + @Override + public boolean equals(Object o) { + if (o == null) return false; + if (o.getClass() != getClass()) return false; + + Pane pane = (Pane) o; + return name.equals(pane.name); + } + + @Override + public int hashCode() { + return name.hashCode(); + } } } diff --git a/plugins/add-kml.user.js b/plugins/add-kml.user.js index 0ff7d41b..1ba8191e 100644 --- a/plugins/add-kml.user.js +++ b/plugins/add-kml.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allows users to overlay their own KML / GPX files on top of IITC +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow users to overlay their own KML / GPX files on top of IITC. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-bing.user.js b/plugins/basemap-bing.user.js index a9b8478c..43d0fea8 100644 --- a/plugins/basemap-bing.user.js +++ b/plugins/basemap-bing.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the maps.bing.com map layers ( +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the maps.bing.com map layers. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-cloudmade.user.js b/plugins/basemap-cloudmade.user.js index 34b584be..20027d7d 100644 --- a/plugins/basemap-cloudmade.user.js +++ b/plugins/basemap-cloudmade.user.js @@ -11,7 +11,7 @@ // optional: browse their map styles, add/modify any you like to the cmStyles list // You take your own responsibility for any API key you register and use. Please read -// any relevant terms and conditions. At the time of writing, Cloudmade offer a reasonable +// any relevant terms and conditions. At the time of writing, Cloudmade offers a reasonable // number of free requests, which should be more than enough for personal use. You could // probably share a key with a group of people without issues, but it is your responsibility // to remain within any terms and usage limits. diff --git a/plugins/basemap-gmaps-gray.user.js b/plugins/basemap-gmaps-gray.user.js index 28f31b00..73c73fdf 100644 --- a/plugins/basemap-gmaps-gray.user.js +++ b/plugins/basemap-gmaps-gray.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a simplified gray Version of Google map tiles as an optional layer +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a simplified gray Version of Google map tiles as an optional layer. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-mapquest-open-aerial.user.js b/plugins/basemap-mapquest-open-aerial.user.js index 30d1fe06..776b93d7 100644 --- a/plugins/basemap-mapquest-open-aerial.user.js +++ b/plugins/basemap-mapquest-open-aerial.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Adds the MapQuest Open Aerial satellite view tiles as a map layer. High detail in the US (lower 48) only +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the MapQuest Open Aerial satellite view tiles as a map layer. High detail in the US (lower 48) only. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-nokia-ovi.user.js b/plugins/basemap-nokia-ovi.user.js index e345d921..fe0a1bc2 100644 --- a/plugins/basemap-nokia-ovi.user.js +++ b/plugins/basemap-nokia-ovi.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add various map layers from Nokia OVI Maps +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add various map layers from Nokia OVI Maps. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-opencyclemap.user.js b/plugins/basemap-opencyclemap.user.js index 5d5964e0..5ba1175b 100644 --- a/plugins/basemap-opencyclemap.user.js +++ b/plugins/basemap-opencyclemap.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the OpenCycleMap.org map tiles as an optional layer +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the OpenCycleMap.org map tiles as an optional layer. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-openstreetmap.user.js b/plugins/basemap-openstreetmap.user.js index 3a1ebc59..a0661e2f 100644 --- a/plugins/basemap-openstreetmap.user.js +++ b/plugins/basemap-openstreetmap.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the native OpenStreetMap.org map tiles as an optional layer +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the native OpenStreetMap.org map tiles as an optional layer. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/basemap-stamen.user.js b/plugins/basemap-stamen.user.js index 80e6a3c6..a9520f84 100644 --- a/plugins/basemap-stamen.user.js +++ b/plugins/basemap-stamen.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Adds the 'Toner' and 'Watercolor' map layers from maps.stamen.com +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the 'Toner' and 'Watercolor' map layers from maps.stamen.com. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/bookmarks-by-zaso.user.js b/plugins/bookmarks-by-zaso.user.js index 89d4e6ed..8b324501 100644 --- a/plugins/bookmarks-by-zaso.user.js +++ b/plugins/bookmarks-by-zaso.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Save your favorite Maps and Portals and move the intelmap with a click. Now sync. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Save your favorite Maps and Portals and move the intel map with a click. Now with sync. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/bookmarks-css.css b/plugins/bookmarks-css.css index 2fca0d09..15070e4c 100644 --- a/plugins/bookmarks-css.css +++ b/plugins/bookmarks-css.css @@ -605,4 +605,4 @@ width:96%; height:120px; resize:vertical; -} \ No newline at end of file +} diff --git a/plugins/broken/portal-defense.user.js b/plugins/broken/portal-defense.user.js index 9f95ce4d..e4a430dc 100644 --- a/plugins/broken/portal-defense.user.js +++ b/plugins/broken/portal-defense.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows the defense values of every portal (see also "hightlight portals total mitigation" highlighter) +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows the defense values of every portal (see also "highlight portals total mitigation" highlighter) // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -68,7 +68,7 @@ window.plugin.portalDefense.renderAttackRegion = function(portal) { } var region = L.marker(portal.getLatLng(), { icon: L.divIcon({ - className: 'plugin-iic-defense', + className: 'plugin-iitc-defense', clickable: false, iconAnchor: [-10,10], html: "
"+display+"
" @@ -127,7 +127,7 @@ var setup = function() { $('#toolbox').append('
Reload Defense'); $("'); - - }; var setup = window.plugin.miniMap.setup; diff --git a/plugins/pan-control.user.js b/plugins/pan-control.user.js index 7e9788cc..69486c55 100644 --- a/plugins/pan-control.user.js +++ b/plugins/pan-control.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows a panning control on the map +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows a panning control on the map. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/player-tracker.user.js b/plugins/player-tracker.user.js index 20d7cd46..ece79b0a 100644 --- a/plugins/player-tracker.user.js +++ b/plugins/player-tracker.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Draws trails for the path a user went onto the map based on status messages in COMMs. Draws up to three hours. Does not request chat data on its own, even if that would be useful. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Draw trails for the path a user took onto the map based on status messages in COMMs. Uses up to three hours of data. Does not request chat data on its own, even if that would be useful. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-counts.user.js b/plugins/portal-counts.user.js index 07f92162..f1deeaef 100644 --- a/plugins/portal-counts.user.js +++ b/plugins/portal-counts.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a list of all localized portals by level and faction +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a list of all localized portals by level and faction. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-forgotten.user.js b/plugins/portal-highlighter-forgotten.user.js index 72d8281b..50f5d44e 100644 --- a/plugins/portal-highlighter-forgotten.user.js +++ b/plugins/portal-highlighter-forgotten.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Highlight unclaimed portals with no recent activity. Shades of red from one week to one month, then tinted to purple for longer. (May also highlight captured portals that are stuck and fail to decay every 24 hours) +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Highlight unclaimed portals with no recent activity. Shades of red from one week to one month, then tinted to purple for longer. May also highlight captured portals that are stuck and fail to decay every 24 hours. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-hide-team.user.js b/plugins/portal-highlighter-hide-team.user.js index 7cfab35b..0145e5e0 100644 --- a/plugins/portal-highlighter-hide-team.user.js +++ b/plugins/portal-highlighter-hide-team.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show all portals as neutral, as if uncaptured. Great for creating plans +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show all portals as neutral, as if uncaptured. Great for creating plans. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-infrastructure.user.js b/plugins/portal-highlighter-infrastructure.user.js index 0a59ed53..c44e9f39 100644 --- a/plugins/portal-highlighter-infrastructure.user.js +++ b/plugins/portal-highlighter-infrastructure.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Red - No Picture, Yellow - Potential title issue, Orange - both of these +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Red - No Picture, Yellow - Potential title issue, Orange - both of these. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-level-color.user.js b/plugins/portal-highlighter-level-color.user.js index 5118fd77..ba877e25 100644 --- a/plugins/portal-highlighter-level-color.user.js +++ b/plugins/portal-highlighter-level-color.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals level color. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the fill color of the portals to denote portal level by using the game level colors. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-missing-resonators.user.js b/plugins/portal-highlighter-missing-resonators.user.js index 8788467a..77740ef4 100644 --- a/plugins/portal-highlighter-missing-resonators.user.js +++ b/plugins/portal-highlighter-missing-resonators.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to denote if the portal is missing resonators. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the fill color of the portals to denote if the portal is missing resonators. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-needs-recharge.user.js b/plugins/portal-highlighter-needs-recharge.user.js index 0991627c..fa767f49 100644 --- a/plugins/portal-highlighter-needs-recharge.user.js +++ b/plugins/portal-highlighter-needs-recharge.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to denote if the portal needs recharging. Colours also indicate severity: yellow: above 85%, orange: above 50%, red: above 15%, magenta: below 15% +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the fill color of the portals to denote if the portal needs recharging. Colors also indicate severity: yellow: above 85%, orange: above 50%, red: above 15%, magenta: below 15%. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-highlighter-portals-my-level.user.js b/plugins/portal-highlighter-portals-my-level.user.js index fe87ebeb..4ac89b48 100644 --- a/plugins/portal-highlighter-portals-my-level.user.js +++ b/plugins/portal-highlighter-portals-my-level.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals above or below your level +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals above or below your level. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portal-names.user.js b/plugins/portal-names.user.js index a1f140a9..fdc68b7c 100644 --- a/plugins/portal-names.user.js +++ b/plugins/portal-names.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show portal names on the map +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show portal names on the map. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index ce61c6a6..6b173449 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -6,7 +6,7 @@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a sortable list of all visible portals with full details about the team, resonators, shields, etc. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a sortable list of all visible portals with full details about the team, resonators, links, etc. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -112,13 +112,17 @@ window.plugin.portalslist.displayPL = function() { html = '
Nothing to show!
'; }; - dialog({ - html: '
' + html + '
', - dialogClass: 'ui-dialog-portalslist', - title: 'Portal list: ' + window.plugin.portalslist.listPortals.length + ' ' + (window.plugin.portalslist.listPortals.length == 1 ? 'portal' : 'portals'), - id: 'portal-list', - width: 700 - }); + if(typeof android !== 'undefined' && android && android.addPane) { + $('
' + html + '
').appendTo(document.body); + } else { + dialog({ + html: '
' + html + '
', + dialogClass: 'ui-dialog-portalslist', + title: 'Portal list: ' + window.plugin.portalslist.listPortals.length + ' ' + (window.plugin.portalslist.listPortals.length == 1 ? 'portal' : 'portals'), + id: 'portal-list', + width: 700 + }); + } //run the name resolving process //resolvePlayerNames(); @@ -224,9 +228,23 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) { return div; } +window.plugin.portalslist.onPaneChanged = function(pane) { + if(pane == "plugin-portalslist") + window.plugin.portalslist.displayPL(); + else + $("#portalslist").remove() +}; + var setup = function() { - $('#toolbox').append(' Portals list'); + if(typeof android !== 'undefined' && android && android.addPane) { + android.addPane("plugin-portalslist", "Portals list", "ic_action_paste"); + addHook("paneChanged", window.plugin.portalslist.onPaneChanged); + } else { + $('#toolbox').append(' Portals list'); + } + $('head').append(''); }; -var setup = window.plugin.zoomSlider.setup; +var setup = window.plugin.zoomSlider.setup; // PLUGIN END //////////////////////////////////////////////////////////