@ -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);
|
||||
|
@ -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) {
|
||||
|
BIN
mobile/res/drawable-hdpi/ic_action_new_event.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
mobile/res/drawable-hdpi/ic_action_paste.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
mobile/res/drawable-hdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
mobile/res/drawable-mdpi/ic_action_new_event.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
mobile/res/drawable-mdpi/ic_action_paste.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
mobile/res/drawable-mdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
mobile/res/drawable-xhdpi/ic_action_new_event.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
mobile/res/drawable-xhdpi/ic_action_paste.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
mobile/res/drawable-xhdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
mobile/res/drawable-xxhdpi/ic_action_new_event.png
Normal file
After Width: | Height: | Size: 521 B |
BIN
mobile/res/drawable-xxhdpi/ic_action_paste.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
mobile/res/drawable-xxhdpi/ic_action_star.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
28
mobile/res/layout/dialog_notice.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_notice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_do_not_show_again"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notice_do_not_show_again"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@ -56,18 +56,26 @@
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
]]>
|
||||
</string>
|
||||
<string name="notice_drawers">
|
||||
<![CDATA[IITCm recently changed its navigation structure. How to use it:<br><br>
|
||||
<string name="notice_how_to">
|
||||
<![CDATA[<b>How to use IITCm:</b><br><br>
|
||||
• 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.<br><br>
|
||||
• 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<br><br>
|
||||
• You can add official plugins in the settings<br><br>
|
||||
• For external plugins please have a look at the <a href="http://iitc.jonatkins.com/?page=faq#mobile-plugins">FAQ]]>
|
||||
</string>
|
||||
<string name="notice_info">
|
||||
<![CDATA[Hint: Alternative ways to open the info screen:<br><br>
|
||||
• tap and hold a portal for a second<br>
|
||||
• tap on the left half of the status bar]]>
|
||||
</string>
|
||||
<string name="notice_panes">
|
||||
<![CDATA[Hint:<br><br>
|
||||
Some plugins (e.g. portals list and bookmarks) now appear in the navigation drawer for quick access.<br>
|
||||
They won\'t appear in the info pane any more.<br><br>
|
||||
Swipe from the left edge of your screen (or click the app icon) to seem them.]]>
|
||||
</string>
|
||||
|
||||
<string name="pref_ui_cat">UI</string>
|
||||
<string name="pref_misc_cat">Misc</string>
|
||||
@ -140,6 +148,7 @@
|
||||
<string name="search_hint">Search Locations</string>
|
||||
<string name="intent_error">Address could not be opened</string>
|
||||
<string name="msg_copied">Copied to clipboard…</string>
|
||||
<string name="notice_do_not_show_again">Do not show again</string>
|
||||
|
||||
<string name="tab_map">Map</string>
|
||||
<string name="tab_share">Share</string>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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<Pane> {
|
||||
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<Pane> {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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.
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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: "<div class='defense-label'>"+display+"</div>"
|
||||
@ -127,7 +127,7 @@ var setup = function() {
|
||||
$('#toolbox').append(' <a onclick="window.plugin.portalDefense.reload()">Reload Defense</a>');
|
||||
$("<style>")
|
||||
.prop("type", "text/css")
|
||||
.html(".plugin-iic-defense {\
|
||||
.html(".plugin-iitc-defense {\
|
||||
font-size: 10px;\
|
||||
color: #FFFFBB;\
|
||||
font-family: monospace;\
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace rawdata
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Developer debugging aid: Adds a link to the portal details to show the raw data of a portal
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Developer debugging aid: Add a link to the portal details to show the raw data of a portal.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allows you to draw things into the current map so you may plan your next move
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow drawing things onto the current map so you may plan your next move.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Force https access for ingress.com/intel. If the intel site is accessed via http, it redirects to the https version
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Force https access for ingress.com/intel. If the intel site is accessed via http, it redirects to the https version.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Tries to determine player levels from the data available in the current view
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Try to determine player levels from the data available in the current view.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/xosofox/IPAS
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Adds a link to the portal details to open the portal in IPAS - Ingress Portal Attack Simulator on http://ipas.graphracer.com
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a link to the portal details to open the portal in IPAS - Ingress Portal Attack Simulator on http://ipas.graphracer.com.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the manually entered key counts from keys plugin on the map.
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the manually entered key counts from the 'keys' plugin on the map.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow manual entry of key counts for each portal. Use 'keys-on-map' to show the numbers on the map, and 'sync' to share between multiple browsers or desktop/mobile.
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow manual entry of key counts for each portal. Use the 'keys-on-map' plugin to show the numbers on the map, and 'sync' to share between multiple browsers or desktop/mobile.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Find farms by minimum level
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Find farms by minimum level.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the direction of links on the map, by adding short dashes to the line at the origin portal.
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the direction of links on the map by adding short dashes to the line at the origin portal.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -5,7 +5,7 @@
|
||||
// @version 0.4.2.@@DATETIMEVERSION@@
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Calculates how to link the portals to create a reasonably tidy set of links/fields. Enable from the layer chooser. (Max Links is a poor name, but remains for historical reasons.)
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Calculate how to link the portals to create a reasonably tidy set of links/fields. Enable from the layer chooser. (Max Links is a poor name, but remains for historical reasons.)
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows a mini map on the corner of the map
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show a mini map on the corner of the map.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
@ -41,17 +41,17 @@ window.plugin.miniMap.setup = function() {
|
||||
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', maxZoom: 18, subdomains: mqSubdomains};
|
||||
var mqMap = new L.TileLayer(mqTileUrlPrefix+'/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
|
||||
|
||||
if(!isSmartphone()) {
|
||||
// desktop mode - bottom-left, so it doesn't clash with the sidebar
|
||||
new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomleft'}).addTo(window.map);
|
||||
} else {
|
||||
// mobile mode - bottom-right - so it floats above the map copyright text
|
||||
new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomright'}).addTo(window.map);
|
||||
}
|
||||
setTimeout(function() {
|
||||
if(!isSmartphone()) {
|
||||
// desktop mode - bottom-left, so it doesn't clash with the sidebar
|
||||
new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomleft'}).addTo(window.map);
|
||||
} else {
|
||||
// mobile mode - bottom-right - so it floats above the map copyright text
|
||||
new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomright'}).addTo(window.map);
|
||||
}
|
||||
}, 0);
|
||||
|
||||
$('head').append('<style>@@INCLUDESTRING:external/Control.MiniMap.css@@</style>');
|
||||
|
||||
|
||||
};
|
||||
|
||||
var setup = window.plugin.miniMap.setup;
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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*
|
||||
|
@ -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 = '<table><tr><td>Nothing to show!</td></tr></table>';
|
||||
};
|
||||
|
||||
dialog({
|
||||
html: '<div id="portalslist">' + html + '</div>',
|
||||
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) {
|
||||
$('<div id="portalslist" class="mobile">' + html + '</div>').appendTo(document.body);
|
||||
} else {
|
||||
dialog({
|
||||
html: '<div id="portalslist">' + html + '</div>',
|
||||
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(' <a onclick="window.plugin.portalslist.displayPL()" title="Display a list of portals in the current view">Portals list</a>');
|
||||
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(' <a onclick="window.plugin.portalslist.displayPL()" title="Display a list of portals in the current view">Portals list</a>');
|
||||
}
|
||||
|
||||
$('head').append('<style>' +
|
||||
'#portalslist.mobile {background: transparent; border: 0 none !important; height: 100% !important; width: 100% !important; left: 0 !important; top: 0 !important; position: absolute; overflow: auto; }' +
|
||||
'#portalslist table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +
|
||||
'#portalslist table td, #portalslist table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' +
|
||||
'#portalslist table tr.res td { background-color: #005684; }' +
|
||||
|
@ -3,7 +3,7 @@
|
||||
// @name IITC plugin: Privacy view on Intel
|
||||
// @version 1.0.0.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] From Intel hides info which shouldn't leak to players of other fraction
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Hide info from intel which shouldn't leak to players of the other faction.
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @include https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows scale bar on the map
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows scale bar on the map.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] IITC now defaults to showing fewer portals when zoomed out, making this plugin unnecessary
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] IITC now defaults to showing fewer portals when zoomed out, making this plugin unnecessary.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Tries to show the linked portals (image, name and address) in portal detail view and jump to linked portal on click
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Try to show the linked portals (image, name and link direction) in portal detail view and jump to linked portal on click. Some details may not be available if the linked portal is not in the current view.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
@ -74,17 +74,17 @@ window.plugin.showLinkedPortal.getPortalByGuid = function (guid,isorigin) {
|
||||
if (window.portals[guid] !== undefined) {
|
||||
var portalData = window.portals[guid].options.data;
|
||||
|
||||
var portalNameAdressAlt = "'" + portalData.title + "'";;
|
||||
var portalNameAdressTitle = $('<div/>').append($('<strong/>').text(portalData.title))
|
||||
.append($('<br/>'))
|
||||
.append(linkDirection)
|
||||
.html();
|
||||
var portalNameAddressAlt = "'" + portalData.title + "'";;
|
||||
var portalNameAddressTitle = $('<div/>').append($('<strong/>').text(portalData.title))
|
||||
.append($('<br/>'))
|
||||
.append(linkDirection)
|
||||
.html();
|
||||
var imageUrl = fixPortalImageUrl(portalData.image);
|
||||
portalInfoString = $('<div/>').html($('<img/>').attr('src', imageUrl)
|
||||
.attr('class', 'minImg')
|
||||
.attr('alt', portalNameAdressAlt)
|
||||
.attr('title', portalNameAdressTitle))
|
||||
.html();
|
||||
.attr('alt', portalNameAddressAlt)
|
||||
.attr('title', portalNameAddressTitle))
|
||||
.html();
|
||||
} else {
|
||||
var title = $('<div/>').append($('<strong/>').text('Go to portal'))
|
||||
.append($('<br/>'))
|
||||
|
@ -5,7 +5,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow speech input for location search (webkit only for now - NOT Firefox)
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow speech input for location search (webkit only for now - NOT Firefox).
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
|
@ -6,7 +6,7 @@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Shows a zoom slider on the map instead of the zoom buttons
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show a zoom slider on the map instead of the zoom buttons.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
@ -27,6 +27,11 @@ window.plugin.zoomSlider.setup = function() {
|
||||
@@INCLUDERAW:external/L.Control.Zoomslider.js@@
|
||||
try { console.log('done loading Leaflet.zoomslider JS'); } catch(e) {}
|
||||
|
||||
// prevent Zoomslider from being activated by default (e.g. in minimap)
|
||||
L.Map.mergeOptions({
|
||||
zoomsliderControl: false
|
||||
});
|
||||
|
||||
if(map.zoomControl._map) {
|
||||
window.map.removeControl(map.zoomControl);
|
||||
}
|
||||
@ -35,7 +40,7 @@ window.plugin.zoomSlider.setup = function() {
|
||||
$('head').append('<style>@@INCLUDESTRING:external/L.Control.Zoomslider.css@@</style>');
|
||||
};
|
||||
|
||||
var setup = window.plugin.zoomSlider.setup;
|
||||
var setup = window.plugin.zoomSlider.setup;
|
||||
|
||||
// PLUGIN END //////////////////////////////////////////////////////////
|
||||
|
||||
|