();
- String gMapsUri;
- try {
- gMapsUri = "http://maps.google.com/?q=loc:" + mLl
- + "%20(" + URLEncoder.encode(mTitle, "UTF-8") + ")&z=" + mZoom;
- } catch (UnsupportedEncodingException e) {
- gMapsUri = "http://maps.google.com/?ll=" + mLl + "&z=" + mZoom;
- Log.w(e);
- }
- Intent gMapsIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(gMapsUri));
- intents.add(gMapsIntent);
- String geoUri = "geo:" + mLl;
- Intent geoIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(geoUri));
- intents.add(geoIntent);
- addTab(intents, R.string.tab_map, R.drawable.ic_action_place);
-
- Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getUrl()));
- addTab(intent, R.string.tab_browser, R.drawable.ic_action_web_site);
- }
-
- private void setupShareIntent(String str) {
- Intent intent = new Intent(Intent.ACTION_SEND);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
- intent.setType("text/plain");
- intent.putExtra(Intent.EXTRA_TEXT, str);
- intent.putExtra(Intent.EXTRA_SUBJECT, mTitle);
- addTab(intent, R.string.tab_share, R.drawable.ic_action_share);
- }
-
@Override
- protected void onCreate(Bundle savedInstanceState) {
+ protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_share);
mComparator = new IntentComparator(this);
+ mGenerator = new IntentGenerator(this);
- mFragmentAdapter = new IntentFragmentAdapter(getSupportFragmentManager());
+ mFragmentAdapter = new FragmentAdapter(getSupportFragmentManager());
final ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
- Intent intent = getIntent();
+ final Intent intent = getIntent();
// from portallinks/permalinks we build 3 intents (share / geo / vanilla-intel-link)
if (!intent.getBooleanExtra("onlyShare", false)) {
mTitle = intent.getStringExtra("title");
@@ -118,10 +76,21 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
mIsPortal = intent.getBooleanExtra("isPortal", false);
actionBar.setTitle(mTitle);
- setupIntents();
+
+ addTab(mGenerator.getShareIntents(mTitle, getIntelUrl()),
+ R.string.tab_share,
+ R.drawable.ic_action_share);
+ addTab(mGenerator.getGeoIntents(mTitle, mLl, mZoom),
+ R.string.tab_map,
+ R.drawable.ic_action_place);
+ addTab(mGenerator.getBrowserIntents(mTitle, getIntelUrl()),
+ R.string.tab_browser,
+ R.drawable.ic_action_web_site);
} else {
mTitle = getString(R.string.app_name);
- setupShareIntent(intent.getStringExtra("shareString"));
+ final String shareString = intent.getStringExtra("shareString");
+
+ addTab(mGenerator.getShareIntents(mTitle, shareString), R.string.tab_share, R.drawable.ic_action_share);
}
mViewPager = (ViewPager) findViewById(R.id.pager);
@@ -129,7 +98,7 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
- public void onPageSelected(int position) {
+ public void onPageSelected(final int position) {
if (actionBar.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD) {
actionBar.setSelectedNavigationItem(position);
}
@@ -138,7 +107,7 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
});
for (int i = 0; i < mFragmentAdapter.getCount(); i++) {
- IntentFragment fragment = (IntentFragment) mFragmentAdapter.getItem(i);
+ final IntentListFragment fragment = (IntentListFragment) mFragmentAdapter.getItem(i);
actionBar.addTab(actionBar
.newTab()
@@ -152,7 +121,7 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
}
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
+ final int selected = mSharedPrefs.getInt("pref_share_selected_tab", 0);
if (selected < mFragmentAdapter.getCount()) {
mViewPager.setCurrentItem(selected);
if (actionBar.getNavigationMode() != ActionBar.NAVIGATION_MODE_STANDARD) {
@@ -171,8 +140,15 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
return mComparator;
}
+ public void launch(final Intent intent) {
+ mComparator.trackIntentSelection(intent);
+ mGenerator.cleanup(intent);
+ startActivity(intent);
+ finish();
+ }
+
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
@@ -182,17 +158,17 @@ public class ShareActivity extends FragmentActivity implements ActionBar.TabList
}
@Override
- public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+ public void onTabReselected(final ActionBar.Tab tab, final FragmentTransaction fragmentTransaction) {
}
@Override
- public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
- int position = tab.getPosition();
+ public void onTabSelected(final ActionBar.Tab tab, final FragmentTransaction fragmentTransaction) {
+ final int position = tab.getPosition();
mViewPager.setCurrentItem(position);
setSelected(position);
}
@Override
- public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+ public void onTabUnselected(final ActionBar.Tab tab, final FragmentTransaction fragmentTransaction) {
}
}
diff --git a/plugins/bookmarks-by-zaso.user.js b/plugins/bookmarks-by-zaso.user.js
index e15075f9..f50e578c 100644
--- a/plugins/bookmarks-by-zaso.user.js
+++ b/plugins/bookmarks-by-zaso.user.js
@@ -2,7 +2,7 @@
// @id iitc-plugin-bookmarks@ZasoGD
// @name IITC plugin: Bookmarks for maps and portals
// @category Controls
-// @version 0.2.7.@@DATETIMEVERSION@@
+// @version 0.2.8.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -151,18 +151,11 @@
}
if(newStatus === 1) {
- $('#bookmarksBox').show();
- $('#bkmrksTrigger').hide();
+ $('#bookmarksBox').css('height', 'auto');
+ $('#bkmrksTrigger').css('height', '0');
} else {
- $('#bookmarksBox').hide();
- $('#bkmrksTrigger').show();
- }
-
- if(window.plugin.bookmarks.isSmart) {
- var button = $('#bkmrksTrigger');
- button.toggleClass('open');
- if(button.hasClass('open')) { button.text('[-] Bookmarks'); }
- else{ button.text('[+] Bookmarks'); }
+ $('#bkmrksTrigger').css('height', '64px');
+ $('#bookmarksBox').css('height', '0');
}
window.plugin.bookmarks.statusBox['show'] = newStatus;
@@ -433,6 +426,11 @@
}
}
+ window.plugin.bookmarks.deleteMode = function() {
+ $('#bookmarksBox').toggleClass('deleteMode');
+ }
+
+
/***************************************************************************************************************************************************************/
// Saved the new sort of the folders (in the localStorage)
@@ -489,6 +487,7 @@
items:"li.bookmarkFolder:not(.othersBookmarks)",
handle:".bookmarksAnchor",
placeholder:"sortable-placeholder",
+ helper:'clone', // fix accidental click in firefox
forcePlaceholderSize:true,
update:function(event, ui) {
var typeList = $('#'+ui.item.context.id).parent().parent('.bookmarkList').attr('id');
@@ -501,6 +500,7 @@
connectWith:".bookmarkList ul ul",
handle:".bookmarksLink",
placeholder:"sortable-placeholder",
+ helper:'clone', // fix accidental click in firefox
forcePlaceholderSize:true,
update:function(event, ui) {
var typeList = $('#'+ui.item.context.id).parent().parent().parent().parent('.bookmarkList').attr('id');
@@ -520,11 +520,6 @@
title: 'Bookmarks Options'
});
- if(window.plugin.bookmarks.isAndroid()) {
- $('a:contains(\'Save box\'), a:contains(\'Reset box\')').addClass('disabled');
- } else {
- $('a:contains(\'Share all\')').addClass('disabled');
- }
window.runHooks('pluginBkmrksOpenOpt');
}
@@ -534,7 +529,7 @@
}
window.plugin.bookmarks.optCopy = function() {
- if(typeof android !== 'undefined' && android && android.intentPosLink) {
+ if(typeof android !== 'undefined' && android && android.shareString) {
return android.shareString(localStorage[window.plugin.bookmarks.KEY_STORAGE]);
} else {
dialog({
@@ -545,20 +540,49 @@
}
}
- window.plugin.bookmarks.optPaste = function() {
- var promptAction = prompt('Press CTRL+V to paste it.', '');
- if(promptAction !== null && promptAction !== '') {
- localStorage[window.plugin.bookmarks.KEY_STORAGE] = promptAction;
- window.plugin.bookmarks.refreshBkmrks();
- window.runHooks('pluginBkmrksEdit', {"target": "all", "action": "import"});
- console.log('BOOKMARKS: reset and imported bookmarks');
- window.plugin.bookmarks.optAlert('Successful. ');
+ window.plugin.bookmarks.optExport = function() {
+ if(typeof android !== 'undefined' && android && android.saveFile) {
+ android.saveFile("IITC-bookmarks.json", "application/json", localStorage[window.plugin.bookmarks.KEY_STORAGE]);
}
}
+ window.plugin.bookmarks.optPaste = function() {
+ var promptAction = prompt('Press CTRL+V to paste it.', '');
+ if(promptAction !== null && promptAction !== '') {
+ try {
+ JSON.parse(promptAction); // try to parse JSON first
+ localStorage[window.plugin.bookmarks.KEY_STORAGE] = promptAction;
+ window.plugin.bookmarks.refreshBkmrks();
+ window.runHooks('pluginBkmrksEdit', {"target": "all", "action": "import"});
+ console.log('BOOKMARKS: reset and imported bookmarks');
+ window.plugin.bookmarks.optAlert('Successful. ');
+ } catch(e) {
+ console.warn('BOOKMARKS: failed to import data: '+e);
+ window.plugin.bookmarks.optAlert('Import failed ');
+ }
+ }
+ }
+
+ window.plugin.bookmarks.optImport = function() {
+ if (window.requestFile === undefined) return;
+ window.requestFile(function(filename, content) {
+ try {
+ JSON.parse(content); // try to parse JSON first
+ localStorage[window.plugin.bookmarks.KEY_STORAGE] = content;
+ window.plugin.bookmarks.refreshBkmrks();
+ window.runHooks('pluginBkmrksEdit', {"target": "all", "action": "import"});
+ console.log('BOOKMARKS: reset and imported bookmarks');
+ window.plugin.bookmarks.optAlert('Successful. ');
+ } catch(e) {
+ console.warn('BOOKMARKS: failed to import data: '+e);
+ window.plugin.bookmarks.optAlert('Import failed ');
+ }
+ });
+ }
+
window.plugin.bookmarks.optReset = function() {
- var promptAction = prompt('All bookmarks will be deleted. Are you sure? [Y/N]', '');
- if(promptAction !== null && (promptAction === 'Y' || promptAction === 'y')) {
+ var promptAction = confirm('All bookmarks will be deleted. Are you sure?', '');
+ if(promptAction) {
delete localStorage[window.plugin.bookmarks.KEY_STORAGE];
window.plugin.bookmarks.createStorage();
window.plugin.bookmarks.loadStorage();
@@ -618,6 +642,8 @@
if(latlngs.length >= 2 && latlngs.length <= 3) {
// TODO: add an API to draw-tools rather than assuming things about it's internals
var newItem;
+ window.plugin.drawTools.setOptions();
+
if(latlngs.length == 2) {
newItem = L.geodesicPolyline(latlngs, window.plugin.drawTools.lineOptions);
} else {
@@ -885,6 +911,7 @@
+''
+''
+'
Maps
'
@@ -904,19 +931,27 @@
+'
+ Folder'
+'
'
+''
+ +''
+'';
plugin.bookmarks.htmlDisabledMessage = 'Plugin Bookmarks disabled*.
';
plugin.bookmarks.htmlStar = '';
plugin.bookmarks.htmlCalldrawBox = 'Auto draw';
plugin.bookmarks.htmlCallSetBox = 'Bookmarks Opt';
- plugin.bookmarks.htmlSetbox = '';
+
+ var actions = '';
+ actions += 'Reset bookmarks';
+ actions += 'Copy bookmarks';
+ actions += 'Paste bookmarks';
+
+ if(plugin.bookmarks.isAndroid()) {
+ actions += 'Import bookmarks';
+ actions += 'Export bookmarks';
+ } else {
+ actions += 'Save box position';
+ actions += 'Reset box position';
+ }
+ plugin.bookmarks.htmlSetbox = '' + actions + '
';
}
/***************************************************************************************************************************************************************/
diff --git a/plugins/bookmarks-css.css b/plugins/bookmarks-css.css
index 9c160667..a8630974 100644
--- a/plugins/bookmarks-css.css
+++ b/plugins/bookmarks-css.css
@@ -9,13 +9,20 @@
line-height:22px;
text-indent:0;
text-decoration:none;
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
}
+
#bookmarksBox{
display:block;
position:absolute !important;
z-index:4001;
top:100px;
left:100px;
+ width:231px;
+ height:auto;
+ overflow:hidden;
}
#bookmarksBox .addForm,
#bookmarksBox #bookmarksTypeBar,
@@ -25,33 +32,40 @@
color:#fff;
font-size:14px;
}
-#bookmarksBox #topBar,
-#bookmarksBox #topBar *{
+#bookmarksBox #topBar{
height:15px !important;
}
+#bookmarksBox #topBar *{
+ height: 14px !important;
+}
#bookmarksBox #topBar *{
float:left !important;
}
#bookmarksBox .handle{
- text-indent:-20px;
- width:209px;
+ width:80%;
text-align:center;
color:#fff;
- line-height:8px;
+ line-height:6px;
cursor:move;
}
#bookmarksBox #topBar .btn{
display:block;
- width:19px;
+ width:10%;
cursor:pointer;
color:#20a8b1;
-}
-#bookmarksBox #topBar #bookmarksMin{
+
font-weight:bold;
text-align:center;
- line-height:14px;
+ line-height:13px;
font-size:18px;
}
+
+#bookmarksBox #topBar #bookmarksDel{
+ overflow:hidden;
+ text-indent:-999px;
+ background:#B42E2E;
+}
+
#bookmarksBox #topBar #bookmarksMin:hover{
color:#ffce00;
}
@@ -59,8 +73,9 @@
clear:both;
}
#bookmarksBox h5{
- padding:4px 0;
- width:114px;
+ padding:4px 0 23px;
+ width:50%;
+ height:93px !important;
text-align:center;
color:#788;
}
@@ -73,9 +88,8 @@
color:#ffce00;
background:rgba(0,0,0,0);
}
-#bookmarksBox #topBar .btn,
+#bookmarksBox #topBar,
#bookmarksBox .addForm,
-#bookmarksBox .handle,
#bookmarksBox #bookmarksTypeBar,
#bookmarksBox .bookmarkList li.bookmarksEmpty,
#bookmarksBox .bookmarkList li.bkmrk a,
@@ -90,16 +104,16 @@
#bookmarksBox .addForm *{
display:block;
float:left;
- padding:4px 8px 3px;
+ height:28px !important;
}
#bookmarksBox .addForm a{
cursor:pointer;
color:#20a8b1;
font-size:12px;
- width:65px;
+ width:35%;
text-align:center;
line-height:20px;
- padding:4px 0 3px;
+ padding:4px 0 23px;
}
#bookmarksBox .addForm a:hover{
background:#ffce00;
@@ -109,15 +123,19 @@
#bookmarksBox .addForm input{
font-size:11px !important;
color:#ffce00;
- width:81px;
- line-height:11px;
+ height:28px;
+ padding:4px 8px 1px;
+ line-height:12px;
font-size:12px;
- -webkit-box-sizing:content-box;
- -moz-box-sizing:content-box;
- box-sizing:content-box;
}
#bookmarksBox #bkmrk_portals .addForm input{
- width:147px;
+ width:65%;
+}
+#bookmarksBox #bkmrk_maps .addForm input{
+ width:42%;
+}
+#bookmarksBox #bkmrk_maps .addForm a{
+ width:29%;
}
#bookmarksBox .addForm input:hover,
#bookmarksBox .addForm input:focus{
@@ -125,11 +143,12 @@
background:rgba(0,0,0,.6);
}
#bookmarksBox .bookmarkList > ul{
- width:231px;
clear:both;
list-style-type:none;
color:#fff;
overflow:hidden;
+ overflow-y:auto;
+ max-height:580px;
}
#bookmarksBox .sortable-placeholder{
background:rgba(8,48,78,.55);
@@ -161,12 +180,12 @@
color:#eee;
}
#bookmarksBox ul .bookmarksRemoveFrom{
- width:19px;
+ width:10%;
text-align:center;
color:#fff;
}
#bookmarksBox ul .bookmarksLink{
- width:171px;
+ width:90%;
padding:0 10px 0 8px;
color:#ffce00;
}
@@ -174,7 +193,7 @@
color:#03fe03;
}
#bookmarksBox ul .othersBookmarks .bookmarksLink{
- width:190px;
+ width:90%;
}
#bookmarksBox ul .bookmarksLink:hover{
color:#03fe03;
@@ -183,6 +202,8 @@
color:#fff;
background:#e22 !important;
}
+
+/*---- UI border -----*/
#bookmarksBox,
#bookmarksBox *{
border-color:#20a8b1;
@@ -193,40 +214,44 @@
#bookmarksBox ul .bookmarkFolder{
border-top-width:1px;
}
+
#bookmarksBox #topBar,
#bookmarksBox #bookmarksTypeBar,
#bookmarksBox .addForm,
#bookmarksBox ul .bookmarkFolder .folderLabel,
-#bookmarksBox ul li.bkmrk{
+#bookmarksBox ul li.bkmrk a {
border-bottom-width:1px;
}
-#bookmarksBox ul .bookmarkFolder,
-#bookmarksBox ul .bookmarksRemoveFrom{
+#bookmarksBox ul .bookmarkFolder{
border-right-width:1px;
border-left-width:1px;
}
#bookmarksBox #topBar *,
#bookmarksBox #bookmarksTypeBar *,
-#bookmarksBox .addForm *{
+#bookmarksBox .addForm *,
+#bookmarksBox ul li.bkmrk{
border-left-width:1px;
}
#bookmarksBox #topBar,
#bookmarksBox #bookmarksTypeBar,
-#bookmarksBox .addForm{
+#bookmarksBox .addForm,
+#bookmarksBox ul .bookmarksRemoveFrom{
border-right-width:1px;
}
-#bookmarksBox ul .othersBookmarks .bookmarksRemoveFrom,
+#bookmarksBox ul .bookmarkFolder.othersBookmarks li.bkmrk,
#bookmarksBox ul .bookmarkFolder .folderLabel .bookmarksRemoveFrom{
border-left-width:0;
}
#bkmrksTrigger{
- display:none;
+ display:block !important;
position:absolute;
+ overflow:hidden;
top:0;
left:277px;
width:47px;
margin-top:-36px;
height:64px;
+ height:0;
cursor:pointer;
z-index:2999;
background-position:center bottom;
@@ -272,17 +297,25 @@
}
#bookmarksBox .bookmarkList .bkmrk.ui-sortable-helper{
border-right-width:1px;
- border-left-width:1px;
+ border-left-width:1px !important;
}
#bookmarksBox .bookmarkList ul li ul li.sortable-placeholder{
height:23px;
box-shadow:inset 0 -1px 0 #20a8b1,inset 1px 0 0 #20a8b1;
}
+
#bookmarksBox .bookmarkList ul li.bookmarkFolder.ui-sortable-helper,
-#bookmarksBox .bookmarkList ul li.othersBookmarks ul,
#bookmarksBox .bookmarkList ul li.othersBookmarks ul li.sortable-placeholder{
box-shadow:inset 0 -1px 0 #20a8b1;
}
+
+#bookmarksBox #topBar #bookmarksDel,
+#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel:hover .bookmarksRemoveFrom,
+#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel:hover .bookmarksAnchor{
+ border-bottom-width:1px;
+}
+
+/*---------*/
#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel .bookmarksAnchor span,
#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel > span,
#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel > span > span,
@@ -304,7 +337,7 @@
#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel .bookmarksAnchor{
line-height:25px;
color:#fff;
- width:209px;
+ width:90%;
}
#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel .bookmarksAnchor span{
float:left;
@@ -336,6 +369,7 @@
#bookmarksBox .bookmarkList .bookmarkFolder.open .folderLabel > span,
#bookmarksBox .bookmarkList .bookmarkFolder.open .folderLabel > span > span{
display:block;
+ display:none;
}
#bookmarksBox .bookmarkList .bookmarkFolder.open .folderLabel:hover > span > span{
border-color:transparent #036 transparent transparent;
@@ -345,7 +379,7 @@
}
#bookmarksBox .bookmarkList .bookmarkFolder ul{
display:none;
- margin-left:19px;
+ margin-left:10%;
}
#bookmarksBox .bookmarkList .bookmarkFolder.open ul{
display:block;
@@ -355,6 +389,26 @@
margin-left:0;
}
+/*---- Width for deleteMode -----*/
+#bookmarksBox .bookmarksRemoveFrom{
+ display:none !important;
+}
+#bookmarksBox.deleteMode .bookmarksRemoveFrom{
+ display:block !important;
+}
+
+#bookmarksBox .bookmarkList .bookmarkFolder .folderLabel .bookmarksAnchor,
+#bookmarksBox ul .bookmarksLink,
+#bookmarksBox ul .othersBookmarks .bookmarksLink{
+ width:100% !important;
+}
+
+#bookmarksBox.deleteMode .bookmarkList .bookmarkFolder .folderLabel .bookmarksAnchor,
+#bookmarksBox.deleteMode ul .bookmarksLink,
+#bookmarksBox.deleteMode ul .othersBookmarks .bookmarksLink{
+ width:90% !important;
+}
+
/**********************************************
MOBILE
**********************************************/
@@ -367,7 +421,8 @@
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
- background: transparent !important;;
+ background: transparent !important;
+ overflow:auto !important;
}
#bookmarksBox.mobile .bookmarkList ul,
#bookmarksBox.mobile .bookmarkList ul li,
@@ -380,14 +435,27 @@
box-shadow:none !important;
border-width:0 !important;
}
-#bookmarksBox.mobile #topBar{
+#bookmarksBox.mobile #topBar #bookmarksMin,
+#bookmarksBox.mobile #topBar .handle{
display:none !important;
}
+
+#bookmarksBox.mobile #topBar #bookmarksDel{
+ width:100%;
+ height:34px !important;
+ font-size:13px;
+ color:#fff;
+ font-weight:normal;
+ padding-top:11px;
+ text-indent:0;
+}
+
#bookmarksBox.mobile #bookmarksTypeBar h5{
cursor:pointer;
text-align:center;
float:left;
width:50%;
+ height:auto !important;
padding:7px 0;
}
#bookmarksBox.mobile #bookmarksTypeBar h5.current{
@@ -413,14 +481,14 @@
#bookmarksBox.mobile .bookmarkList li.bookmarkFolder a.bookmarksRemoveFrom,
#bookmarksBox.mobile .bookmarkList li.bkmrk a.bookmarksRemoveFrom{
box-shadow:inset 0 1px 0 #20a8b1,inset -1px 0 0 #20a8b1 !important;
- width:15%;
+ width:10%;
background:none !important;
}
#bookmarksBox.mobile .bookmarkList li.bookmarkFolder a.bookmarksAnchor,
#bookmarksBox.mobile .bookmarkList li.bkmrk a.bookmarksLink{
text-indent:10px;
- width:85%;
- height:21px;
+ height:36px;
+ line-height:24px;
overflow:hidden;
}
#bookmarksBox.mobile .bookmarkList ul li.bookmarkFolder ul{
@@ -428,7 +496,6 @@
}
#bookmarksBox.mobile .bookmarkList > ul{
border-bottom:1px solid #20a8b1 !important;
- border-right:1px solid #20a8b1 !important;
}
#bookmarksBox.mobile .bookmarkList .bookmarkFolder.othersBookmarks ul{
@@ -440,14 +507,14 @@
}
#bookmarksBox.mobile .bookmarkList > ul{
max-height:none;
- width:85% !important;
+/* width:85% !important;*/
}
#bookmarksBox.mobile .bookmarkList li.bookmarkFolder .folderLabel{
box-shadow:0 1px 0 #20a8b1 !important;
}
#bookmarksBox.mobile .bookmarkList ul li.bookmarkFolder ul{
- width:85% !important;
- margin-left:15% !important;
+ width:90% !important;
+ margin-left:10% !important;
}
#bookmarksBox.mobile .bookmarkList ul li.bookmarkFolder.othersBookmarks ul{
width:100% !important;
@@ -461,7 +528,7 @@
}
#bookmarksBox.mobile .addForm,
#bookmarksBox.mobile .addForm *{
- height:35px;
+ height:35px !important;
padding:0;
}
#bookmarksBox.mobile .addForm a{
@@ -469,14 +536,14 @@
}
#bookmarksBox.mobile .addForm a{
- width:25% !important;
+/* width:25% !important;*/
}
#bookmarksBox.mobile .addForm input{
- width:50% !important;
+/* width:50% !important;*/
text-indent:10px;
}
#bookmarksBox.mobile #bkmrk_portals .addForm input{
- width:75% !important;
+/* width:75% !important;*/
}
#bookmarksBox.mobile #bookmarksTypeBar h5,
#bookmarksBox.mobile .bookmarkList .addForm a{
@@ -530,10 +597,10 @@
#bookmarksBox.mobile .bookmarkList .bookmarkFolder.open .folderLabel > span > span{
display:block !important;
}
+
/**********************************************
DIALOG BOX
**********************************************/
-
/*---- Auto Drawer -----*/
#bkmrksAutoDrawer,
#bkmrksAutoDrawer p,
@@ -597,4 +664,4 @@
width:96%;
height:120px;
resize:vertical;
-}
+}
\ No newline at end of file
diff --git a/plugins/default-intel-detail.user.js b/plugins/default-intel-detail.user.js
index 8bcc0ef2..107792a9 100644
--- a/plugins/default-intel-detail.user.js
+++ b/plugins/default-intel-detail.user.js
@@ -2,7 +2,7 @@
// @id iitc-plugin-default-intel-detail@jonatkins
// @name IITC plugin: Default intel detail level
// @category Tweaks
-// @version 0.1.0.@@DATETIMEVERSION@@
+// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -24,23 +24,9 @@ window.plugin.defaultIntelDetail = function() {};
window.plugin.defaultIntelDetail.setup = function() {
- var stockIntelDetail = nemesis.dashboard.zoomlevel.ZOOM_TO_LOD_;
-
- // save the original function - so we can chain to it for levels we don't modify
- var origGetMinPortalLevelForZoom = window.getMinPortalLevelForZoom;
-
- // replace the window.getMinPortalLevelForZoom function - modify behaviour when L1+ or L3+ portals are shown
-
- window.getMinPortalLevelForZoom = function(z) {
- // for the further out zoom levels, use the stock intel site detail levels
- if (z <= 11) {
- return stockIntelDetail[z];
- }
- // for the closer zoom levels, stock intel and IITC default is the same. falling back
- // in this case allows this plugin to work alongside show-more-portals
- return origGetMinPortalLevelForZoom(z);
- }
-
+// NOTE: the logic required is closely tied to the IITC+stock map detail level code - so the logic is moved there now
+// and just enabled by this flag
+ window.CONFIG_ZOOM_DEFAULT_DETAIL_LEVEL=true;
};
diff --git a/plugins/draw-tools.user.js b/plugins/draw-tools.user.js
index 55aaf01b..865a71e8 100644
--- a/plugins/draw-tools.user.js
+++ b/plugins/draw-tools.user.js
@@ -34,8 +34,27 @@ window.plugin.drawTools.loadExternals = function() {
$('head').append('');
}
-window.plugin.drawTools.currentColor = '#a24ac3';
+window.plugin.drawTools.getMarkerIcon = function(color) {
+ if (typeof(color) === 'undefined') {
+ console.warn('Color is not set or not a valid color. Using default color as fallback.');
+ color = '#a24ac3';
+ }
+ var svgIcon = window.plugin.drawTools.markerTemplate.replace(/%COLOR%/g, color);
+
+ return L.divIcon({
+ iconSize: new L.Point(25, 41),
+ iconAnchor: new L.Point(12, 41),
+ html: svgIcon,
+ className: 'leaflet-iitc-custom-icon',
+ // L.divIcon does not use the option color, but we store it here to
+ // be able to simply retrieve the color for serializing markers
+ color: color
+ });
+}
+
+window.plugin.drawTools.currentColor = '#a24ac3';
+window.plugin.drawTools.markerTemplate = '@@INCLUDESTRING:images/marker-icon.svg.template@@';
window.plugin.drawTools.setOptions = function() {
@@ -60,7 +79,7 @@ window.plugin.drawTools.setOptions = function() {
delete window.plugin.drawTools.editOptions.color;
window.plugin.drawTools.markerOptions = {
- icon: new L.Icon.Default(),
+ icon: window.plugin.drawTools.currentMarker,
zIndexOffset: 2000
};
@@ -68,11 +87,13 @@ window.plugin.drawTools.setOptions = function() {
window.plugin.drawTools.setDrawColor = function(color) {
window.plugin.drawTools.currentColor = color;
+ window.plugin.drawTools.currentMarker = window.plugin.drawTools.getMarkerIcon(color);
window.plugin.drawTools.drawControl.setDrawingOptions({
'polygon': { 'shapeOptions': { color: color } },
'polyline': { 'shapeOptions': { color: color } },
'circle': { 'shapeOptions': { color: color } },
+ 'marker': { 'icon': window.plugin.drawTools.currentMarker },
});
}
@@ -113,14 +134,15 @@ window.plugin.drawTools.addDrawControl = function() {
snapPoint: window.plugin.drawTools.getSnapLatLng,
},
- marker: {
+ // Options for marker (icon, zIndexOffset) are not set via shapeOptions,
+ // so we have merge them here!
+ marker: L.extend({}, window.plugin.drawTools.markerOptions, {
title: 'Add a marker.\n\n'
+ 'Click on the button, then click on the map where\n'
+ 'you want the marker to appear.',
- shapeOptions: window.plugin.drawTools.markerOptions,
snapPoint: window.plugin.drawTools.getSnapLatLng,
- repeatMode: true,
- },
+ repeatMode: true
+ }),
},
@@ -190,6 +212,7 @@ window.plugin.drawTools.save = function() {
} else if (layer instanceof L.Marker) {
item.type = 'marker';
item.latLng = layer.getLatLng();
+ item.color = layer.options.icon.options.color;
} else {
console.warn('Unknown layer type when saving draw tools layer');
return; //.eachLayer 'continue'
@@ -233,7 +256,9 @@ window.plugin.drawTools.import = function(data) {
layer = L.geodesicCircle(item.latLng, item.radius, L.extend({},window.plugin.drawTools.polygonOptions,extraOpt));
break;
case 'marker':
- layer = L.marker(item.latLng, window.plugin.drawTools.markerOptions);
+ var extraMarkerOpt = {};
+ if (item.color) extraMarkerOpt.icon = window.plugin.drawTools.getMarkerIcon(item.color);
+ layer = L.marker(item.latLng, L.extend({},window.plugin.drawTools.markerOptions,extraMarkerOpt));
break;
default:
console.warn('unknown layer type "'+item.type+'" when loading draw tools layer');
@@ -256,8 +281,12 @@ window.plugin.drawTools.manualOpt = function() {
//TODO: add line style choosers: thickness, maybe dash styles?
+ ''
+ '';
@@ -302,6 +331,12 @@ window.plugin.drawTools.optCopy = function() {
}
}
+window.plugin.drawTools.optExport = function() {
+ if(typeof android !== 'undefined' && android && android.saveFile) {
+ android.saveFile('IITC-drawn-items.json', 'application/json', localStorage['plugin-draw-tools-layer']);
+ }
+}
+
window.plugin.drawTools.optPaste = function() {
var promptAction = prompt('Press CTRL+V to paste it.', '');
if(promptAction !== null && promptAction !== '') {
@@ -318,10 +353,28 @@ window.plugin.drawTools.optPaste = function() {
console.warn('DRAWTOOLS: failed to import data: '+e);
window.plugin.drawTools.optAlert('Import failed');
}
-
}
}
+window.plugin.drawTools.optImport = function() {
+ if (window.requestFile === undefined) return;
+ window.requestFile(function(filename, content) {
+ try {
+ var data = JSON.parse(content);
+ window.plugin.drawTools.drawnItems.clearLayers();
+ window.plugin.drawTools.import(data);
+ console.log('DRAWTOOLS: reset and imported drawn tiems');
+ window.plugin.drawTools.optAlert('Import Successful.');
+
+ // to write back the data to localStorage
+ window.plugin.drawTools.save();
+ } catch(e) {
+ console.warn('DRAWTOOLS: failed to import data: '+e);
+ window.plugin.drawTools.optAlert('Import failed');
+ }
+ });
+}
+
window.plugin.drawTools.optReset = function() {
var promptAction = confirm('All drawn items will be deleted. Are you sure?', '');
if(promptAction) {
@@ -334,6 +387,8 @@ window.plugin.drawTools.optReset = function() {
}
window.plugin.drawTools.boot = function() {
+ window.plugin.drawTools.currentMarker = window.plugin.drawTools.getMarkerIcon(window.plugin.drawTools.currentColor);
+
window.plugin.drawTools.setOptions();
//create a leaflet FeatureGroup to hold drawn items
diff --git a/plugins/favorite-portals.user.js b/plugins/favorite-portals.user.js
index f82526df..d3b9c888 100644
--- a/plugins/favorite-portals.user.js
+++ b/plugins/favorite-portals.user.js
@@ -3,7 +3,7 @@
// @name IITC plugin: Favorite Portals
// @category Deleted
// @version 0.2.0.@@DATETIMEVERSION@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description Plugin replaced by the "Bookmarks for maps and portals" plugin
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
diff --git a/plugins/fix-googlemap-china-offset.user.js b/plugins/fix-googlemap-china-offset.user.js
new file mode 100644
index 00000000..a25b271a
--- /dev/null
+++ b/plugins/fix-googlemap-china-offset.user.js
@@ -0,0 +1,198 @@
+// ==UserScript==
+// @id iitc-plugin-fix-googlemap-china-offset@breezewish
+// @name IITC plugin: Fix Google Map offsets in China
+// @category Tweaks
+// @version 0.0.1.@@DATETIMEVERSION@@
+// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
+// @updateURL @@UPDATEURL@@
+// @downloadURL @@DOWNLOADURL@@
+// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show correct Google Map for China user by applying offset tweaks.
+// @include https://www.ingress.com/intel*
+// @include http://www.ingress.com/intel*
+// @match https://www.ingress.com/intel*
+// @match http://www.ingress.com/intel*
+// @grant none
+// ==/UserScript==
+
+@@PLUGINSTART@@
+
+// PLUGIN START ////////////////////////////////////////////////////////
+
+// use own namespace for plugin
+window.plugin.fixChinaOffset = {};
+
+// Before understanding how this plugin works, you should know 3 points:
+//
+// Point1.
+// The coordinate system of Ingress is WGS-84.
+// However, the tiles of Google maps (except satellite map) in China have
+// offsets (base on GCJ-02 coordinate system) by China policy.
+// That means, if you request map tiles by giving GCJ-02 position, you
+// will get the correct map.
+//
+// Point2.
+// Currently there are no easy algorithm to transform from GCJ-02 to WGS-84,
+// but we can easily transform data from WGS-84 to GCJ-02.
+//
+// Point3.
+// When using Google maps in IITC, the layer structure looks like this:
+// ----------------------
+// | Other Leaflet layers | (Including portals, links, fields, and so on)
+// ----------------------
+// | L.Google | (Only for controling)
+// ----------------------
+// | Google Map layer | (Generated by Google Map APIs, for rendering maps)
+// ----------------------
+//
+// When users are interacting with L.Google (for example, dragging, zooming),
+// L.Google will perform the same action on the Google Map layer using Google
+// Map APIs.
+//
+// So, here is the internal of the plugin:
+//
+// The plugin overwrites behaviours of L.Google. When users are dragging the map,
+// L.Google will pass offseted positions to Google Map APIs (WGS-84 to GCJ-02).
+// So Google Map APIs will render a correct map.
+//
+// The offset between Google maps and Ingress objects can also be fixed by applying
+// WGS-84 to GCJ-02 transformation on Ingress objects. However we cannot simply know
+// the requesting bounds of Ingress objects because we cannot transform GCJ-02 to
+// WGS-84. As a result, the Ingress objects on maps would be incomplete.
+//
+// The algorithm of transforming WGS-84 to GCJ-02 comes from:
+// https://on4wp7.codeplex.com/SourceControl/changeset/view/21483#353936
+// There is no official algorithm because it is classified information.
+
+/////////// begin WGS84 to GCJ-02 transformer /////////
+var WGS84transformer = window.plugin.fixChinaOffset.WGS84transformer = function() {};
+// Krasovsky 1940
+//
+// a = 6378245.0, 1/f = 298.3
+// b = a * (1 - f)
+// ee = (a^2 - b^2) / a^2;
+WGS84transformer.prototype.a = 6378245.0;
+WGS84transformer.prototype.ee = 0.00669342162296594323;
+
+WGS84transformer.prototype.transform = function(wgLat, wgLng) {
+
+ if(this.isOutOfChina(wgLat, wgLng))
+ return {lat: wgLat, lng: wgLng};
+
+ dLat = this.transformLat(wgLng - 105.0, wgLat - 35.0);
+ dLng = this.transformLng(wgLng - 105.0, wgLat - 35.0);
+ radLat = wgLat / 180.0 * Math.PI;
+ magic = Math.sin(radLat);
+ magic = 1 - this.ee * magic * magic;
+ sqrtMagic = Math.sqrt(magic);
+ dLat = (dLat * 180.0) / ((this.a * (1 - this.ee)) / (magic * sqrtMagic) * Math.PI);
+ dLng = (dLng * 180.0) / (this.a / sqrtMagic * Math.cos(radLat) * Math.PI);
+ mgLat = wgLat + dLat;
+ mgLng = wgLng + dLng;
+
+ return {lat: mgLat, lng: mgLng};
+
+};
+
+WGS84transformer.prototype.isOutOfChina = function(lat, lng) {
+
+ if(lng < 72.004 || lng > 137.8347) return true;
+ if(lat < 0.8293 || lat > 55.8271) return true;
+
+ return false;
+
+};
+
+WGS84transformer.prototype.transformLat = function(x, y) {
+
+ var ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
+ ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(y * Math.PI) + 40.0 * Math.sin(y / 3.0 * Math.PI)) * 2.0 / 3.0;
+ ret += (160.0 * Math.sin(y / 12.0 * Math.PI) + 320 * Math.sin(y * Math.PI / 30.0)) * 2.0 / 3.0;
+
+ return ret;
+
+};
+
+WGS84transformer.prototype.transformLng = function(x, y) {
+
+ var ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
+ ret += (20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(x * Math.PI) + 40.0 * Math.sin(x / 3.0 * Math.PI)) * 2.0 / 3.0;
+ ret += (150.0 * Math.sin(x / 12.0 * Math.PI) + 300.0 * Math.sin(x / 30.0 * Math.PI)) * 2.0 / 3.0;
+
+ return ret;
+
+};
+/////////// end WGS84 to GCJ-02 transformer /////////
+
+var WGS84toGCJ02 = new WGS84transformer();
+
+/////////// begin overwrited L.Google /////////
+window.plugin.fixChinaOffset.L = {};
+window.plugin.fixChinaOffset.L.Google = {
+
+ _update: function(e) {
+
+ if(!this._google) return;
+ this._resize();
+
+ var center = e && e.latlng ? e.latlng : this._map.getCenter();
+
+ ///// modified here ///
+ var _center = window.plugin.fixChinaOffset.getLatLng(center, this._type);
+ ///////////////////////
+
+ this._google.setCenter(_center);
+ this._google.setZoom(this._map.getZoom());
+
+ this._checkZoomLevels();
+
+ },
+
+ _handleZoomAnim: function (e) {
+
+ var center = e.center;
+
+ ///// modified here ///
+ var _center = window.plugin.fixChinaOffset.getLatLng(center, this._type);
+ ///////////////////////
+
+ this._google.setCenter(_center);
+ this._google.setZoom(e.zoom);
+
+ }
+
+}
+/////////// end overwrited L.Google /////////
+
+window.plugin.fixChinaOffset.getLatLng = function(pos, type) {
+
+ // No offsets in satellite and hybrid maps
+ if(type !== 'SATELLITE' && type !== 'HYBRID') {
+ var newPos = WGS84toGCJ02.transform(pos.lat, pos.lng);
+ return new google.maps.LatLng(newPos.lat, newPos.lng);
+ } else {
+ return new google.maps.LatLng(pos.lat, pos.lng);
+ }
+
+};
+
+window.plugin.fixChinaOffset.overwrite = function(dest, src) {
+
+ for(var key in src) {
+ if(src.hasOwnProperty(key)) {
+ dest[key] = src[key];
+ }
+ }
+
+}
+
+var setup = function() {
+
+ window.plugin.fixChinaOffset.overwrite(L.Google.prototype, window.plugin.fixChinaOffset.L.Google);
+
+}
+
+// PLUGIN END //////////////////////////////////////////////////////////
+
+@@PLUGINEND@@
diff --git a/plugins/portal-highlighter-bad-deployment-distance.user.js b/plugins/portal-highlighter-bad-deployment-distance.user.js
index 3ddf3a66..1d8dd459 100644
--- a/plugins/portal-highlighter-bad-deployment-distance.user.js
+++ b/plugins/portal-highlighter-bad-deployment-distance.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-can-make-level.user.js b/plugins/portal-highlighter-can-make-level.user.js
index 1d5acc86..ef022dd1 100644
--- a/plugins/portal-highlighter-can-make-level.user.js
+++ b/plugins/portal-highlighter-can-make-level.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-imminent-decay.user.js b/plugins/portal-highlighter-imminent-decay.user.js
index 14f98297..60296401 100644
--- a/plugins/portal-highlighter-imminent-decay.user.js
+++ b/plugins/portal-highlighter-imminent-decay.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-mitigation.user.js b/plugins/portal-highlighter-mitigation.user.js
index 0956e19f..f3fe1c0b 100644
--- a/plugins/portal-highlighter-mitigation.user.js
+++ b/plugins/portal-highlighter-mitigation.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-mods.user.js b/plugins/portal-highlighter-mods.user.js
index 46e19f2a..4f1664cd 100644
--- a/plugins/portal-highlighter-mods.user.js
+++ b/plugins/portal-highlighter-mods.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-my-8-portals.user.js b/plugins/portal-highlighter-my-8-portals.user.js
index 12cfbeb7..02e4118d 100644
--- a/plugins/portal-highlighter-my-8-portals.user.js
+++ b/plugins/portal-highlighter-my-8-portals.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-my-portals.user.js b/plugins/portal-highlighter-my-portals.user.js
index 7679a824..bac86774 100644
--- a/plugins/portal-highlighter-my-portals.user.js
+++ b/plugins/portal-highlighter-my-portals.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-portal-ap-energy-relative.user.js b/plugins/portal-highlighter-portal-ap-energy-relative.user.js
index be4c81eb..ddf59847 100644
--- a/plugins/portal-highlighter-portal-ap-energy-relative.user.js
+++ b/plugins/portal-highlighter-portal-ap-energy-relative.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-portal-ap-relative.user.js b/plugins/portal-highlighter-portal-ap-relative.user.js
index f5865636..e119c626 100644
--- a/plugins/portal-highlighter-portal-ap-relative.user.js
+++ b/plugins/portal-highlighter-portal-ap-relative.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-portal-ap.user.js b/plugins/portal-highlighter-portal-ap.user.js
index 6d8180c8..49387887 100644
--- a/plugins/portal-highlighter-portal-ap.user.js
+++ b/plugins/portal-highlighter-portal-ap.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @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-upgrade.user.js b/plugins/portal-highlighter-portals-upgrade.user.js
index 2c3f5cef..fca2ca08 100644
--- a/plugins/portal-highlighter-portals-upgrade.user.js
+++ b/plugins/portal-highlighter-portals-upgrade.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/portal-highlighter-with-lvl8-resonators.user.js b/plugins/portal-highlighter-with-lvl8-resonators.user.js
index d7f09d96..01f28340 100644
--- a/plugins/portal-highlighter-with-lvl8-resonators.user.js
+++ b/plugins/portal-highlighter-with-lvl8-resonators.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @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 d6ba283c..74322119 100644
--- a/plugins/portal-names.user.js
+++ b/plugins/portal-names.user.js
@@ -150,13 +150,13 @@ window.plugin.portalNames.updatePortalLabels = function() {
// ass calculating portal marker visibility can take some time when there's lots of portals shown, we'll do it on
// a short timer. this way it doesn't get repeated so much
-window.plugin.portalNames.delayedUpdatePortalLabels = function() {
+window.plugin.portalNames.delayedUpdatePortalLabels = function(wait) {
if (window.plugin.portalNames.timer === undefined) {
window.plugin.portalNames.timer = setTimeout ( function() {
window.plugin.portalNames.timer = undefined;
window.plugin.portalNames.updatePortalLabels();
- }, 0.5*1000);
+ }, wait*1000);
}
}
@@ -168,9 +168,9 @@ var setup = function() {
window.plugin.portalNames.labelLayerGroup = new L.LayerGroup();
window.addLayerGroup('Portal Names', window.plugin.portalNames.labelLayerGroup, true);
- window.addHook('requestFinished', window.plugin.portalNames.delayedUpdatePortalLabels);
- window.addHook('mapDataRefreshEnd', window.plugin.portalNames.delayedUpdatePortalLabels);
- window.map.on('overlayadd overlayremove', window.plugin.portalNames.delayedUpdatePortalLabels);
+ window.addHook('requestFinished', function() { setTimeout(function(){window.plugin.portalNames.delayedUpdatePortalLabels(3.0);},1); });
+ window.addHook('mapDataRefreshEnd', function() { window.plugin.portalNames.delayedUpdatePortalLabels(0.5); });
+ window.map.on('overlayadd overlayremove', function() { setTimeout(function(){window.plugin.portalNames.delayedUpdatePortalLabels(1.0);},1); });
}
// PLUGIN END //////////////////////////////////////////////////////////
diff --git a/plugins/scoreboard.user.js b/plugins/scoreboard.user.js
index b3237809..52ee4d9b 100644
--- a/plugins/scoreboard.user.js
+++ b/plugins/scoreboard.user.js
@@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description PLUGIN CURRENTLY UNAVAILABLE
+// @description This plugin is no longer available, as Niantic optimisations have removed the data it needed.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/show-more-portals.user.js b/plugins/show-more-portals.user.js
index 11cc5d99..0dde84dd 100644
--- a/plugins/show-more-portals.user.js
+++ b/plugins/show-more-portals.user.js
@@ -2,7 +2,7 @@
// @id iitc-plugin-show-more-portals@jonatkins
// @name IITC plugin: Show more portals
// @category Tweaks
-// @version 0.1.6.@@DATETIMEVERSION@@
+// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -24,27 +24,9 @@ window.plugin.showMorePortals = function() {};
window.plugin.showMorePortals.setup = function() {
- // save the original function - so we can chain to it for levels we don't modify
- var origGetMinPortalLevelForZoom = window.getMinPortalLevelForZoom;
-
- // replace the window.getMinPortalLevelForZoom function - modify behaviour when L1+ or L3+ portals are shown
-
- window.getMinPortalLevelForZoom = function(z) {
- var level = origGetMinPortalLevelForZoom(z);
-
- // as of 2013-10-16...
-
- // the stock site uses the same tile size for both L1+ portals and all portals
- // therefore, changing the L1+ zoom levels into all portals zoom level is not unfriendly to the servers
- // and the same applies for L2+ and L3+ detail levels
- // (in some ways it's nicer, as IITC caches better)
-
- if (level == 1) level = 0;
- if (level == 3) level = 2;
-
- return level;
- }
-
+// NOTE: the logic required is closely tied to the IITC+stock map detail level code - so the logic is moved there now
+// and just enabled by this flag
+ window.CONFIG_ZOOM_SHOW_MORE_PORTALS=true;
};
diff --git a/website/page/faq.php b/website/page/faq.php
index cf706b6b..6ab7ab79 100644
--- a/website/page/faq.php
+++ b/website/page/faq.php
@@ -158,19 +158,17 @@ From here you can remove/disable individual plugins or IITC itself.
END
),
-'mobile-plugins' => Array ( "IITC Mobile: Is it possible to add other plugins to IITC Mobile?",
+'mobile-plugins' => Array ( "IITC Mobile: Is it possible to add external plugins to IITC Mobile?",
<<<'END'
Yes it is!
-- Create a folder named "IITC_Mobile" in your home directory.
-- Inside this folder, create a new folder named "plugins".
-- Copy all your additional plugins to this folder.
-- You should see your plugins listed above the official plugins.
+- Navigate to the IITC Plugins preference screen and click the (+) icon at the top right. You can select the script using a file explorer of your choice.
+- IITCm creates a new folder in your home directory, named "IITC_Mobile". Inside this folder you'll find a "plugins" folder where all external plugins are copied to.
Note:
- The filename has to end with *.user.js.
-- If you don't know where to find your home directory: Enable dev-mode in the settings and follow the hint.
+- You can also trigger installation by clicking on http(s) links pointing to a plugin, selecting plugins with a file explorer, opening javascript e-mail attachments etc...
END
),
diff --git a/website/page/home.php b/website/page/home.php
index f46f56e4..399a1b46 100644
--- a/website/page/home.php
+++ b/website/page/home.php
@@ -13,39 +13,30 @@ offers many more features. It is available for
Latest news
-13th January 2014
+6th February 2014
-A new IITC release, 0.16.2 and IITC Mobile 0.10.2 have been released. These are needed to work with a change to the
-standard intel site.
-
-
-Additionally, the 'Compute AP Statistics' plugin has been brought back, the 'blank map' base layer has a new black option
-to go with the white, and the 'Yandex' base map has had some bug fixes. Also, IITC Mobile features some changes to
-the 'show my location' feature. You may need to turn this option on again for it to work.
-
-
-Update 14th January 2014: An updated IITC Mobile, 0.10.3, has been released, to fix a crash issue seen by some.
-Also, a minor update was made to the main IITC script which changes the order the data is loaded, to match a change made to
-the standard intel site.
-
-
-21st December 2013
-
-Just in time for the holidays, another IITC update. IITC 0.16.1 and IITC Mobile 0.10.1 have just been released.
-Changes include
+IITC 0.16.4 and IITC Mobile 0.10.4 have just been released. This version is required to fix a bug with showing portal details
+due to a change made by Niantic to the intel site protocol. Also, the following changes have been made:
-- Portals list plugin returns - but less data than before due to the Niantic backend changes
-- Resonators plugin returns - but only shows the selected portal
-- Mobile:
+
- Portal markers are now reduced in size when you zoom out, reducing clutter when viewing large areas of the map
+- Blocked a 3rd party plugin, arc, from running - it had spyware features hidden within it
+(details here).
+- Plugins
- - Some plugins moved to panes from the left-swipe menu: portals list, portal counts
- - Immersive fullscreen mode on Android 4.4 KitKat
- - Sort apps in share activity - most used at the top
- - Fix links sometimes being badly drawn on mobile
+ - add-kml: support for opening files on mobile added
+ - regions: new plugin to draw the scoreboard regions on the map. No support for showing scores - this needs Niantic to add it to the standard intel site first
+ - score-cycle-times: new plugin to show the times of the scoreboard cycles
+ - draw-tools: added basic import/export (via copy+paste), and colour choosing options (click on "DrawTools Opt" in the sidebar)
+ - compute-ap-stats and portal-names: changed code to reduce the performance impact when a large number of portals are shown
-- .. and, as always, other various bug fixes, improvements, etc
+- Mobile:
+
+ - NFC support for sharing map view/selected portal - app permissions updated for this
+
+
+- .. plus various minor bugfixes and improvements
Older news
diff --git a/website/page/news.php b/website/page/news.php
index c14bc1c3..20c36b14 100644
--- a/website/page/news.php
+++ b/website/page/news.php
@@ -1,5 +1,31 @@
News
+6th February 2014
+
+IITC 0.16.4 and IITC Mobile 0.10.4 have just been released. This version is required to fix a bug with showing portal details
+due to a change made by Niantic to the intel site protocol. Also, the following changes have been made:
+
+
+- Portal markers are now reduced in size when you zoom out, reducing clutter when viewing large areas of the map
+- Blocked a 3rd party plugin, arc, from running - it had spyware features hidden within it
+(details here).
+- Plugins
+
+ - add-kml: support for opening files on mobile added
+ - regions: new plugin to draw the scoreboard regions on the map. No support for showing scores - this needs Niantic to add it to the standard intel site first
+ - score-cycle-times: new plugin to show the times of the scoreboard cycles
+ - draw-tools: added basic import/export (via copy+paste), and colour choosing options (click on "DrawTools Opt" in the sidebar)
+ - compute-ap-stats and portal-names: changed code to reduce the performance impact when a large number of portals are shown
+
+
+- Mobile:
+
+ - NFC support for sharing map view/selected portal - app permissions updated for this
+
+
+- .. plus various minor bugfixes and improvements
+
+
13th January 2014
A new IITC release, 0.16.2 and IITC Mobile 0.10.2 have been released. These are needed to work with a change to the