Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
This commit is contained in:
		
							
								
								
									
										34
									
								
								NEWS.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								NEWS.md
									
									
									
									
									
								
							| @@ -1,6 +1,36 @@ | ||||
| CHANGES IN 0.5 / 0.51 | ||||
| CHANGES IN 0.6 / 0.61 | ||||
| ===================== | ||||
|  | ||||
| 0.6 had a broken link to style sheets. Fixed in 0.61. | ||||
|  | ||||
| - **SECURITY**: Chat was vulnerable to XSS attacks. Update as soon as | ||||
|                 possible. | ||||
|  | ||||
| - Feature: [**more plugins**](https://github.com/breunigs/ingress-intel-total-conversion/tree/gh-pages/plugins#readme) | ||||
|     - weakened portals: highlights portals with few resonators or ones | ||||
|                         that are decayed, making it easier to see where | ||||
|                         to attack or defend | ||||
|     - draw tools: allow you to draw things on the map, making it easier | ||||
|                   to plan your next big field | ||||
| - Feature: chat now has a tab that shows all automated messages, not | ||||
|            only the last one per user | ||||
| - Feature: render lines between portals and their resonators | ||||
| - Change: resonators are only re-rendered on demand, could improve per- | ||||
|           formance | ||||
| - Change: AP Gain now also includes gains by deploying resonators | ||||
| - Change: portal images are not shrinked instead of cut in preview | ||||
| - Bugfix: styling issues in sidebar (by cmrn) | ||||
| - Bugfix: “field decayed” and similar messages were not shown | ||||
| - Bugfix: tooltips have broken alignment sometimes (by saithis) | ||||
| - Bugfix: chat sometimes didn’t warn if message didn’t went through | ||||
| - Bugfix: base layer was not saved properly | ||||
| - Bugfix: avoid zooming to invalid lat/lng, crashing the browser | ||||
|  | ||||
|  | ||||
|  | ||||
| CHANGES IN 0.5 / 0.51 | ||||
| --------------------- | ||||
|  | ||||
| - Feature: draw resonators on map on high zoom levels (by Xelio) | ||||
| - Feature: show AP if portal is taken down (by Pirozek) | ||||
| - Feature: collapsible sidebar (by cmrn) | ||||
| @@ -15,7 +45,7 @@ CHANGES IN 0.5 / 0.51 | ||||
|           backgrouds (by jonatkins) | ||||
| - Change: increased hack range from 35m to 40m | ||||
| - Change: Sidebar now semi-transparent, just like chat (by cmrn) | ||||
| - Change: portals are now sizes according to their level (by OshiHidra) | ||||
| - Change: portals are now sized according to their level (by OshiHidra) | ||||
| - Change: resonators are now more aligned to their octant (thanks | ||||
|           Worros for helping confirming the slot-to-octant matching) | ||||
| - Change: release versions are now put in `dist/`. This should avoid | ||||
|   | ||||
| @@ -20,8 +20,8 @@ Features | ||||
| - feels faster. (Likely because [leaflet](http://leafletjs.com/) is faster, although there are some other tricks.) | ||||
| - full view of portal images | ||||
| - better chat | ||||
|   - separated automated/public/faction | ||||
|   - only showing the last automated message for each user. Makes a great “where are they now” guide. | ||||
|   - separated full/compact/public/faction | ||||
|   - compact only shows the last automated message for each user. Makes a great “where are they now” guide. | ||||
|   - nick tab completion | ||||
|   - clickable links | ||||
| - automatic idle resume | ||||
| @@ -38,7 +38,7 @@ Features | ||||
| Install | ||||
| ------- | ||||
|  | ||||
| Current version is 0.51. See [NEWS.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/NEWS.md) for details. | ||||
| Current version is 0.61. See [NEWS.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/NEWS.md) for details. **THIS VERSION CONTAINS A SECURITY UPDATE.** Please update as soon as possible and also alert friends about it. | ||||
|  | ||||
| [**INSTALL**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js) | ||||
|  | ||||
|   | ||||
							
								
								
									
										23
									
								
								code/boot.js
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								code/boot.js
									
									
									
									
									
								
							| @@ -6,21 +6,20 @@ | ||||
| // be run once. | ||||
|  | ||||
| window.setupLargeImagePreview = function() { | ||||
|   $('#portaldetails').on('click', '.imgpreview img', function() { | ||||
|   $('#portaldetails').on('click', '.imgpreview', function() { | ||||
|     var ex = $('#largepreview'); | ||||
|     if(ex.length > 0) { | ||||
|       ex.remove(); | ||||
|       return; | ||||
|     } | ||||
|     var img = $(this).parent().html(); | ||||
|     var w = $(this)[0].naturalWidth/2; | ||||
|     var h = $(this)[0].naturalHeight/2; | ||||
|     var img = $(this).html(); | ||||
|     var w = $(this).find('img')[0].naturalWidth/2; | ||||
|     var h = $(this).find('img')[0].naturalHeight/2; | ||||
|     var c = $('#portaldetails').attr('class'); | ||||
|     $('body').append( | ||||
|       '<div id="largepreview" class="'+c+'" style="margin-left: '+(-SIDEBAR_WIDTH/2-w-2)+'px; margin-top: '+(-h-2)+'px">' + img + '</div>' | ||||
|     ); | ||||
|     $('#largepreview').click(function() { $(this).remove() }); | ||||
|     $('#largepreview img').attr('title', ''); | ||||
|   }); | ||||
| } | ||||
|  | ||||
| @@ -280,13 +279,23 @@ function asyncLoadScript(a){return function(b,c){var d=document.createElement("s | ||||
|  | ||||
| // modified version of https://github.com/shramov/leaflet-plugins. Also | ||||
| // contains the default Ingress map style. | ||||
| var LLGMAPS = 'http://breunigs.github.com/ingress-intel-total-conversion/dist/leaflet_google.js'; | ||||
| var LEAFLETGOOGLE = 'http://breunigs.github.com/ingress-intel-total-conversion/dist/leaflet_google.js'; | ||||
| var JQUERY = 'https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'; | ||||
| var JQUERYUI = 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js'; | ||||
| var LEAFLET = 'http://cdn.leafletjs.com/leaflet-0.5/leaflet.js'; | ||||
| var AUTOLINK = 'http://breunigs.github.com/ingress-intel-total-conversion/dist/autolink.js'; | ||||
| var EMPTY = 'data:text/javascript;base64,'; | ||||
|  | ||||
| // don’t download resources which have been injected already | ||||
| var ir = window && window.internalResources ? window.internalResources : []; | ||||
| if(ir.indexOf('jquery')        !== -1) JQUERY   = EMPTY; | ||||
| if(ir.indexOf('jqueryui')      !== -1) JQUERYUI = EMPTY; | ||||
| if(ir.indexOf('leaflet')       !== -1) LEAFLET  = EMPTY; | ||||
| if(ir.indexOf('autolink')      !== -1) AUTOLINK = EMPTY; | ||||
| if(ir.indexOf('leafletgoogle') !== -1) LEAFLETGOOGLE = EMPTY; | ||||
|  | ||||
|  | ||||
| // after all scripts have loaded, boot the actual app | ||||
| load(JQUERY, LEAFLET, AUTOLINK).then(LLGMAPS, JQUERYUI).onError(function (err) { | ||||
| load(JQUERY, LEAFLET, AUTOLINK).then(LEAFLETGOOGLE, JQUERYUI).onError(function (err) { | ||||
|   alert('Could not all resources, the script likely won’t work.\n\nIf this happend the first time for you, it’s probably a temporary issue. Just wait a bit and try again.\n\nIf you installed the script for the first time and this happens:\n– try disabling NoScript if you have it installed\n– press CTRL+SHIFT+K in Firefox or CTRL+SHIFT+I in Chrome/Opera and reload the page. Additional info may be available in the console.\n– Open an issue at https://github.com/breunigs/ingress-intel-total-conversion/issues'); | ||||
| }).thenRun(boot); | ||||
|   | ||||
| @@ -347,15 +347,16 @@ window.renderResonators = function(ent, portalLayer) { | ||||
|         weight: 1, | ||||
|         fillColor: COLORS_LVL[rdata.level], | ||||
|         fillOpacity: rdata.energyTotal/RESO_NRG[rdata.level], | ||||
|         clickable: false, | ||||
|         guid: resoGuid // need this here as well for add/remove events | ||||
|     }); | ||||
|  | ||||
|     // line connecting reso to portal | ||||
|     var conn = L.polyline([Rlatlng, portalLatLng], { | ||||
|     var conn = L.polyline([portalLatLng, Rlatlng], { | ||||
|         weight: 2, | ||||
|         color: '#FFFFFF', | ||||
|         opacity: 0.2, | ||||
|         dashArray: '10,4', | ||||
|         color: '#FFA000', | ||||
|         opacity: 0.25, | ||||
|         dashArray: '0,10,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,4', | ||||
|         fill: false, | ||||
|         clickable: false}); | ||||
|  | ||||
|   | ||||
| @@ -57,13 +57,16 @@ window.renderPortalDetails = function(guid) { | ||||
|     var lat = d.locationE6.latE6; | ||||
|     var lng = d.locationE6.lngE6; | ||||
|     var perma = 'http://ingress.com/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid; | ||||
|     var imgTitle = 'title="'+getPortalDescriptionFromDetails(d)+'\n\nClick to show full image."'; | ||||
|  | ||||
|     $('#portaldetails') | ||||
|       .attr('class', TEAM_TO_CSS[getTeam(d)]) | ||||
|       .html('' | ||||
|         + '<h3>'+d.portalV2.descriptiveText.TITLE+'</h3>' | ||||
|         // help cursor via “.imgpreview img” | ||||
|         + '<div class="imgpreview"><img src="'+img+'" title="'+getPortalDescriptionFromDetails(d)+'\n\nClick to show full image."/></div>' | ||||
|         + '<div class="imgpreview" '+imgTitle+' style="background-image: url('+img+')">' | ||||
|         + '<img class="hide" src="'+img+'"/>' | ||||
|         + '</div>' | ||||
|         + '<span id="level">'+Math.floor(getPortalLevel(d))+'</span>' | ||||
|         + '<div class="mods">'+getModDetails(d)+'</div>' | ||||
|         + '<div id="randdetails">'+randDetails+'</div>' | ||||
|   | ||||
| @@ -73,7 +73,7 @@ window.getEnergyText = function(d) { | ||||
|  | ||||
| window.getAvgResoDistText = function(d) { | ||||
|   var avgDist = Math.round(10*getAvgResoDist(d))/10; | ||||
|   return ['⌀ res dist', avgDist + ' m']; | ||||
|   return ['reso dist', avgDist + ' m']; | ||||
| } | ||||
|  | ||||
| window.getResonatorDetails = function(d) { | ||||
|   | ||||
							
								
								
									
										626
									
								
								dist/style.0.6.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										626
									
								
								dist/style.0.6.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,626 @@ | ||||
| /* general rules ******************************************************/ | ||||
|  | ||||
| html, body, #map { | ||||
|   height: 100%; | ||||
|   width: 100%; | ||||
| } | ||||
|  | ||||
| body { | ||||
|   font-size: 14px; | ||||
|   font-family: "coda",arial,helvetica,sans-serif; | ||||
|   margin: 0; | ||||
| } | ||||
|  | ||||
| #scrollwrapper { | ||||
|   overflow: hidden; | ||||
|   position: fixed; | ||||
|   right: -38px; | ||||
|   top: 0; | ||||
|   width: 340px; | ||||
|   bottom: 45px; | ||||
|   z-index: 1001; | ||||
| } | ||||
|  | ||||
| #sidebar { | ||||
|   background-color: rgba(8, 48, 78, 0.9); | ||||
|   border-left: 1px solid #20A8B1; | ||||
|   color: #888; | ||||
|   position: relative; | ||||
|   left: 0; | ||||
|   top: 0; | ||||
|   max-height: 100%; | ||||
|   overflow-y:scroll; | ||||
|   overflow-x:hidden; | ||||
|   z-index: 3000; | ||||
| } | ||||
|  | ||||
| #sidebartoggle { | ||||
|   display: block; | ||||
|   padding: 20px 5px; | ||||
|   margin-top: -31px; /* -(toggle height / 2) */ | ||||
|   line-height: 10px; | ||||
|   position: absolute; | ||||
|   top: 340px; /* (sidebar height / 2) */ | ||||
|   z-index: 3001; | ||||
|   background-color: rgba(8, 48, 78, 0.9); | ||||
|   color: #FFCE00; | ||||
|   border: 1px solid #20A8B1; | ||||
|   border-right: none; | ||||
|   border-radius: 5px 0 0 5px; | ||||
|   text-decoration: none; | ||||
| } | ||||
|  | ||||
| .enl { | ||||
|   color: #03fe03 !important; | ||||
| } | ||||
|  | ||||
| .res { | ||||
|   color: #00c5ff !important; | ||||
| } | ||||
|  | ||||
| .none { | ||||
|   color: #fff; | ||||
| } | ||||
|  | ||||
| a { | ||||
|   color: #ffce00; | ||||
|   cursor: pointer; | ||||
|   text-decoration: none; | ||||
| } | ||||
|  | ||||
| a:hover { | ||||
|   text-decoration: underline; | ||||
| } | ||||
|  | ||||
| /* map display, required because GMaps uses a high z-index which is | ||||
|  * normally above Leaflet’s vector pane */ | ||||
| .leaflet-map-pane { | ||||
|   z-index: 1000; | ||||
| } | ||||
|  | ||||
| .leaflet-control-layers-overlays label.disabled { | ||||
|   text-decoration: line-through; | ||||
|   cursor: help; | ||||
| } | ||||
|  | ||||
| .help { | ||||
|   cursor: help; | ||||
| } | ||||
|  | ||||
| .toggle { | ||||
|   display: block; | ||||
|   height: 0; | ||||
|   width: 0; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* chat ***************************************************************/ | ||||
|  | ||||
| #chatcontrols { | ||||
|   color: #FFCE00; | ||||
|   background: rgba(8, 48, 78, 0.9); | ||||
|   position: absolute; | ||||
|   left: 0; | ||||
|   z-index: 3001; | ||||
|   height: 26px; | ||||
|   padding-left:1px; | ||||
| } | ||||
|  | ||||
| #chatcontrols.expand { | ||||
|   top: 0; | ||||
|   bottom: auto; | ||||
| } | ||||
|  | ||||
| #chatcontrols a { | ||||
|   margin-left: -1px; | ||||
|   display: inline-block; | ||||
|   width: 94px; | ||||
|   text-align: center; | ||||
|   height: 24px; | ||||
|   line-height: 24px; | ||||
|   border: 1px solid #20A8B1; | ||||
|   vertical-align: top; | ||||
| } | ||||
|  | ||||
| #chatcontrols a:first-child { | ||||
|   letter-spacing:-1px; | ||||
|   text-decoration: none !important; | ||||
| } | ||||
|  | ||||
| #chatcontrols a.active { | ||||
|   border-color: #FFCE00; | ||||
|   border-bottom-width:0px; | ||||
|   font-weight:bold | ||||
| } | ||||
|  | ||||
| #chatcontrols a.active + a { | ||||
|   border-left-color: #FFCE00 | ||||
| } | ||||
|  | ||||
|  | ||||
| #chatcontrols .toggle { | ||||
|   border-left: 10px solid transparent; | ||||
|   border-right: 10px solid transparent; | ||||
|   margin: 6px auto auto; | ||||
| } | ||||
|  | ||||
| #chatcontrols .expand { | ||||
|   border-bottom: 10px solid #FFCE00; | ||||
| } | ||||
|  | ||||
| #chatcontrols .shrink { | ||||
|   border-top: 10px solid #FFCE00; | ||||
| } | ||||
|  | ||||
|  | ||||
| #chat { | ||||
|   position: absolute; | ||||
|   width: 708px; | ||||
|   bottom: 24px; | ||||
|   left: 0; | ||||
|   z-index: 3000; | ||||
|   background: rgba(8, 48, 78, 0.9); | ||||
|   font-size: 12.6px; | ||||
|   color: #eee; | ||||
|   border: 1px solid #20A8B1; | ||||
|   border-bottom: 0; | ||||
| } | ||||
|  | ||||
| em { | ||||
|   color: red; | ||||
|   font-style: normal; | ||||
| } | ||||
|  | ||||
| #chat.expand { | ||||
|   height:auto; | ||||
|   top: 25px; | ||||
| } | ||||
|  | ||||
| #chatpublic, #chatfull, #chatcompact,  /* FIXME DEPRECATED: */#chatautomated { | ||||
|   display: none; | ||||
| } | ||||
|  | ||||
| #chat > div { | ||||
|   overflow-x:hidden; | ||||
|   overflow-y:scroll; | ||||
|   height: 100%; /* fallback for Opera which doesn’t support calc */ | ||||
|   height: calc(100% - 4px); | ||||
|   height: -webkit-calc(100% - 4px); | ||||
|   height: -moz-calc(100% - 4px); | ||||
|   padding: 2px; | ||||
|   position:relative; | ||||
| } | ||||
|  | ||||
| #chat p { | ||||
|   display: block; | ||||
|   padding: 1px 2px; | ||||
|   margin:0; | ||||
| } | ||||
|  | ||||
| #chat time { | ||||
|   cursor: help; | ||||
| } | ||||
|  | ||||
| time, mark, #chat span, #chat a { | ||||
|   font-family: Verdana, sans-serif; | ||||
|   font-size: 12.6px; | ||||
|   vertical-align: top; | ||||
| } | ||||
|  | ||||
| time { | ||||
|   display: inline-block; | ||||
|   width: 44px; | ||||
|   color: #bbb; | ||||
|   overflow: hidden; | ||||
| } | ||||
|  | ||||
| mark { | ||||
|   display: inline-block; | ||||
|   width: 91px; | ||||
|   margin-right:4px; | ||||
|   overflow:hidden; | ||||
|   vertical-align: top; | ||||
|   background: transparent; | ||||
| } | ||||
|  | ||||
| summary { | ||||
|   color: #bbb; | ||||
|   display: inline-block; | ||||
|   font-family: Verdana,sans-serif; | ||||
|   height: 16px; | ||||
|   overflow: hidden; | ||||
|   padding: 0 2px; | ||||
|   white-space: nowrap; | ||||
|   width: 683px; | ||||
| } | ||||
|  | ||||
| #chat span { | ||||
|   display: inline-block; | ||||
|   width: 540px; | ||||
| } | ||||
|  | ||||
| #chatinput { | ||||
|   line-height:22px; | ||||
|   padding: 0 4px; | ||||
|   position: absolute; | ||||
|   bottom: 0; | ||||
|   left: 0; | ||||
|   background: rgba(8, 48, 78, 0.9); | ||||
|   width: 700px; | ||||
|   border: 1px solid #20A8B1; | ||||
|   z-index: 3001; | ||||
| } | ||||
|  | ||||
| #chat .invisibleseparator { | ||||
|     color: rgba(8, 48, 78, 0.0); | ||||
|     overflow: hidden; | ||||
|     width: 0px; | ||||
| } | ||||
|  | ||||
|  | ||||
| #chatinput span { | ||||
|   font-family: Verdana,sans-serif; | ||||
|   display: inline-block; | ||||
|   font-size: 12.6px; | ||||
|   width: 84px; | ||||
|   color: red; | ||||
|   padding: 0 4px 0 1px; | ||||
|   width: 85px; | ||||
| } | ||||
|  | ||||
| #chatinput input { | ||||
|   background: transparent; | ||||
|   font-size: 12.6px; | ||||
|   font-family: Verdana,sans-serif; | ||||
|   color: #EEEEEE; | ||||
|   width: 558px | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /* sidebar ************************************************************/ | ||||
|  | ||||
| #sidebar > * { | ||||
|   border-bottom: 1px solid #20A8B1; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| #sidebartoggle .toggle { | ||||
|   border-bottom: 10px solid transparent; | ||||
|   border-top: 10px solid transparent; | ||||
| } | ||||
|  | ||||
| #sidebartoggle .open { | ||||
|   border-right: 10px solid #FFCE00; | ||||
| } | ||||
|  | ||||
| #sidebartoggle .close { | ||||
|   border-left: 10px solid #FFCE00; | ||||
| } | ||||
|  | ||||
| /* player stats */ | ||||
| #playerstat { | ||||
|   height: 30px; | ||||
| } | ||||
|  | ||||
| h2 { | ||||
|   color: #ffce00; | ||||
|   font-size: 21px; | ||||
|   padding: 0 4px; | ||||
|   margin: 0; | ||||
|   cursor:help; | ||||
| } | ||||
|  | ||||
| h2 span { | ||||
|   display: inline-block; | ||||
|   overflow: hidden; | ||||
|   text-overflow: "~"; | ||||
|   vertical-align: top; | ||||
|   white-space: nowrap; | ||||
|   width: 205px; | ||||
| } | ||||
|  | ||||
| h2 div { | ||||
|   float: right; | ||||
|   height: 100%; | ||||
|   overflow: hidden; | ||||
| } | ||||
|  | ||||
| h2 sup, h2 sub { | ||||
|   display: block; | ||||
|   font-size: 11px; | ||||
|   margin-bottom: -1px; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* gamestats */ | ||||
| #gamestat, #gamestat span { | ||||
|   height: 22px; | ||||
|   line-height: 22px; | ||||
| } | ||||
|  | ||||
| #gamestat span { | ||||
|   display: block; | ||||
|   float: left; | ||||
|   font-weight: bold; | ||||
|   cursor:help; | ||||
| } | ||||
|  | ||||
| #gamestat .res { | ||||
|   background: #005684; | ||||
|   text-align: right; | ||||
| } | ||||
|  | ||||
| #gamestat .enl { | ||||
|   background: #017f01; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* geosearch input, and others */ | ||||
| input { | ||||
|   background-color: rgba(0, 0, 0, 0.3); | ||||
|   color: #ffce00; | ||||
|   height: 22px; | ||||
|   line-height: 22px; | ||||
|   padding: 0 4px; | ||||
|   font-size: 14px; | ||||
|   border:0; | ||||
|   font-family:inherit; | ||||
| } | ||||
|  | ||||
| ::-webkit-input-placeholder { | ||||
|   font-style: italic; | ||||
| } | ||||
|  | ||||
| :-moz-placeholder { | ||||
|   font-style: italic; | ||||
| } | ||||
|  | ||||
| ::-moz-placeholder { | ||||
|   font-style: italic; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* portal title and image */ | ||||
| h3 { | ||||
|   font-size: 17px; | ||||
|   padding: 0 4px; | ||||
|   margin:0; | ||||
|   height: 25px; | ||||
|   width: 100%; | ||||
|   overflow:hidden; | ||||
|   text-overflow: "~"; | ||||
|   white-space: nowrap; | ||||
| } | ||||
|  | ||||
| .imgpreview { | ||||
|   height: 200px; | ||||
|   background: no-repeat center center; | ||||
|   background-size: contain; | ||||
|   cursor: help; | ||||
|   overflow: hidden; | ||||
| } | ||||
|  | ||||
| .imgpreview img.hide { | ||||
|   display: none; | ||||
| } | ||||
|  | ||||
| #level { | ||||
|   font-size: 40px; | ||||
|   position: absolute; | ||||
|   right: 10px; | ||||
|   text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 0 5px #fff; | ||||
|   top: 100px; | ||||
| } | ||||
|  | ||||
| /* portal mods */ | ||||
| .mods { | ||||
|   margin-bottom: 1px; | ||||
|   margin-top: 5px; | ||||
|   height: 75px; | ||||
| } | ||||
|  | ||||
| .mods span { | ||||
|   background-color: rgba(0, 0, 0, 0.3); | ||||
|   /* can’t use inline-block because Webkit’s implementation is buggy and | ||||
|    * introduces additional margins in random cases. No clear necessary, | ||||
|    * as that’s solved by setting height on .mods. */ | ||||
|   display: block; | ||||
|   float:left; | ||||
|   height: 63.7px; | ||||
|   margin-left: 4px; | ||||
|   overflow: hidden; | ||||
|   padding: 2px; | ||||
|   text-align: center; | ||||
|   width: 63.7px; | ||||
|   cursor:help; | ||||
|   border: 1px solid #666; | ||||
| } | ||||
|  | ||||
| .mods span:not([title]) { | ||||
|   cursor: auto; | ||||
| } | ||||
|  | ||||
| .res .mods span, .res .meter { | ||||
|   border: 1px solid #0076b6; | ||||
| } | ||||
| .enl .mods span, .enl .meter { | ||||
|   border: 1px solid #017f01; | ||||
| } | ||||
|  | ||||
| /* random details list */ | ||||
| #randdetails { | ||||
|   margin: 0 4px; | ||||
|   margin-top: 11px; | ||||
| } | ||||
|  | ||||
| aside { | ||||
|   display: inline-block; | ||||
|   width: 140px; | ||||
| } | ||||
|  | ||||
| aside span { | ||||
|   overflow: hidden; | ||||
|   text-overflow: "~"; | ||||
|   white-space: nowrap; | ||||
|   width: 74px; | ||||
| } | ||||
|  | ||||
| aside:nth-child(odd) { | ||||
|   margin-right: 4px; | ||||
|   text-align: right; | ||||
| } | ||||
|  | ||||
| aside:nth-child(even) { | ||||
|   margin-left: 4px; | ||||
|   text-align: left; | ||||
| } | ||||
|  | ||||
| aside:nth-child(even) span { | ||||
|   float: right; | ||||
|   padding-left: 4px; | ||||
|   text-align: left; | ||||
| } | ||||
|  | ||||
| aside:nth-child(odd) span { | ||||
|   float: left; | ||||
|   padding-right: 4px; | ||||
|   text-align: right; | ||||
| } | ||||
|  | ||||
| #randdetails tt { | ||||
|   font-family: inherit; | ||||
|   cursor: help; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* resonators */ | ||||
| #resodetails { | ||||
|   white-space: nowrap; | ||||
|   margin: 16px 0; | ||||
|   -moz-column-gap: 10px; | ||||
|   -moz-column-width: 141px; | ||||
|   -webkit-column-gap: 10px; | ||||
|   -webkit-column-width: 141px; | ||||
| } | ||||
|  | ||||
| .meter { | ||||
|   background: #000; | ||||
|   cursor: help; | ||||
|   display: inline-block; | ||||
|   height: 14px; | ||||
|   padding: 1px; | ||||
|   width: 58px; | ||||
| } | ||||
|  | ||||
| .meter-text { | ||||
|   display: inline-block; | ||||
|   height: 18px; | ||||
|   margin: 0 4px; | ||||
|   overflow: hidden; | ||||
|   text-overflow: "~"; | ||||
|   vertical-align: top; | ||||
|   white-space: nowrap; | ||||
|   width: 75px; | ||||
| } | ||||
|  | ||||
| .meter-text.left { | ||||
|   text-align: right; | ||||
| } | ||||
|  | ||||
| .meter span { | ||||
|   display: block; | ||||
|   height: 14px; | ||||
| } | ||||
|  | ||||
| .meter-rel { | ||||
|   position: relative; | ||||
|   left: 0; | ||||
|   top: 0; | ||||
| } | ||||
|  | ||||
| .meter-level { | ||||
|   position: absolute; | ||||
|   top: -2px; | ||||
|   left: 25px; | ||||
|   text-shadow: 0.0em 0.0em 0.3em #808080; | ||||
| } | ||||
| /* links below resos */ | ||||
|  | ||||
| .linkdetails { | ||||
|   text-align: center; | ||||
|   margin-bottom: 10px; | ||||
| } | ||||
| .linkdetails aside { | ||||
|   margin: 0 4px; | ||||
|   width: 140px; | ||||
| } | ||||
|  | ||||
| #toolbox { | ||||
|   padding: 4px; | ||||
|   font-size:90%; | ||||
| } | ||||
|  | ||||
| #toolbox > a { | ||||
|   padding: 5px; | ||||
| } | ||||
|  | ||||
| /* a common portal display takes this much space (prevents moving | ||||
|  * content when first selecting a portal) */ | ||||
|  | ||||
| #portaldetails { | ||||
|   min-height: 553px; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* update status */ | ||||
| #updatestatus { | ||||
|   background-color: rgba(8, 48, 78, 0.9); | ||||
|   border-bottom: 0; | ||||
|   border-top: 1px solid #20A8B1; | ||||
|   border-left: 1px solid #20A8B1; | ||||
|   bottom: 0; | ||||
|   color: #ffce00; | ||||
|   font-size:13px; | ||||
|   padding: 4px; | ||||
|   position: fixed; | ||||
|   right: 0; | ||||
|   z-index:3002; | ||||
| } | ||||
|  | ||||
|  | ||||
| /* preview */ | ||||
|  | ||||
| #largepreview { | ||||
|   left: 50%; | ||||
|   position: fixed; | ||||
|   top: 50%; | ||||
|   z-index: 2000; | ||||
| } | ||||
| #largepreview img { | ||||
|   box-shadow: 0 0 40px #000; | ||||
| } | ||||
| #largepreview img { | ||||
|   border: 2px solid #f8ff5e; | ||||
| } | ||||
|  | ||||
| /* tooltips */ | ||||
| .ui-tooltip { | ||||
|   max-width: 300px; | ||||
|   position: absolute; | ||||
|   z-index: 9999; | ||||
|   background-color: #fff; | ||||
|   border: 1px solid #ccc; | ||||
|   color: #222; | ||||
|   font: 13px/15px "Helvetica Neue", Arial, Helvetica, sans-serif; | ||||
|   padding: 2px 4px; | ||||
| } | ||||
|  | ||||
| td { | ||||
|   padding: 0; | ||||
| } | ||||
|  | ||||
| td + td { | ||||
|   padding-left: 4px; | ||||
| } | ||||
							
								
								
									
										865
									
								
								dist/total-conversion-build.user.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										865
									
								
								dist/total-conversion-build.user.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										20
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								main.js
									
									
									
									
									
								
							| @@ -1,7 +1,7 @@ | ||||
| // ==UserScript== | ||||
| // @id             ingress-intel-total-conversion@breunigs | ||||
| // @name           intel map total conversion | ||||
| // @version        0.51-@@BUILDDATE@@ | ||||
| // @version        0.6-@@BUILDDATE@@ | ||||
| // @namespace      https://github.com/breunigs/ingress-intel-total-conversion | ||||
| // @updateURL      https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js | ||||
| // @downloadURL    https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js | ||||
| @@ -49,15 +49,23 @@ for(var i = 0; i < d.length; i++) { | ||||
| // player information is now available in a hash like this: | ||||
| // window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ALIENS||RESISTANCE"}; | ||||
|  | ||||
| var ir = window.internalResources || []; | ||||
|  | ||||
| // remove complete page. We only wanted the user-data and the page’s | ||||
| // security context so we can access the API easily. Setup as much as | ||||
| // possible without requiring scripts. | ||||
| document.getElementsByTagName('head')[0].innerHTML = '' | ||||
|   //~ + '<link rel="stylesheet" type="text/css" href="http://0.0.0.0:8000/style.css"/>' | ||||
|   + '<title>Ingress Intel Map</title>' | ||||
|   + '<link rel="stylesheet" type="text/css" href="http://breunigs.github.com/ingress-intel-total-conversion/style.css?@@BUILDDATE@@"/>' | ||||
|   + '<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css"/>' | ||||
|   + '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Coda"/>'; | ||||
|   + (ir.indexOf('mainstyle') === -1 | ||||
|       ? '<link rel="stylesheet" type="text/css" href="http://breunigs.github.com/ingress-intel-total-conversion/style.css?@@BUILDDATE@@"/>' | ||||
|       : '') | ||||
|   + (ir.indexOf('leafletcss') === -1 | ||||
|       ? '<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css"/>' | ||||
|       : '') | ||||
|   + (ir.indexOf('codafont') === -1 | ||||
|       ? '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Coda"/>' | ||||
|       : ''); | ||||
|  | ||||
| document.getElementsByTagName('body')[0].innerHTML = '' | ||||
|   + '<div id="map">Loading, please wait</div>' | ||||
| @@ -80,7 +88,9 @@ document.getElementsByTagName('body')[0].innerHTML = '' | ||||
|   + '    <input id="geosearch" placeholder="Search location…" type="text"/>' | ||||
|   + '    <div id="portaldetails"></div>' | ||||
|   + '    <input id="redeem" placeholder="Redeem code…" type="text"/>' | ||||
|   + '    <div id="toolbox"><a onmouseover="setPermaLink(this)">permalink</a></div>' | ||||
|   + '    <div id="toolbox">' | ||||
|   + '      <a onmouseover="setPermaLink(this)">permalink</a>' | ||||
|   + '      <a href="https://github.com/breunigs/ingress-intel-total-conversion#readme" title="IITC = Ingress Intel Total Conversion.\n\nOn the script’s homepage you can:\n– find updates\n– get plugins\n– report bugs\n– and contribute." style="cursor: help">IITC’s page</a></div>' | ||||
|   + '  </div>' | ||||
|   + '</div>' | ||||
|   + '<div id="updatestatus"></div>'; | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| cp iitc-debug.user.js          dist/total-conversion-build.user.js | ||||
| cp style.css                   dist/style.css | ||||
| cp external/*                  dist/ | ||||
| cp -r images/                  dist/images | ||||
| rm -r dist/images/ | ||||
| cp -r images/                  dist/images/ | ||||
|  | ||||
| echo 'Change path of style.css to dist/style.css' | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| // ==UserScript== | ||||
| // @id             iitc-plugin-draw-tools@breunigs | ||||
| // @name           iitc: draw tools | ||||
| // @version        0.1 | ||||
| // @version        0.2 | ||||
| // @namespace      https://github.com/breunigs/ingress-intel-total-conversion | ||||
| // @updateURL      https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js | ||||
| // @downloadURL    https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js | ||||
| @@ -47,7 +47,7 @@ window.plugin.drawTools.addStyles = function() { | ||||
| window.plugin.drawTools.addCustomButtons = function() { | ||||
|   $('.leaflet-control-draw .leaflet-bar-part-bottom').removeClass('leaflet-bar-part-bottom'); | ||||
|  | ||||
|   var undo = $('<a class="leaflet-bar-part" title="undo last" href="#">⎌</a>') | ||||
|   var undo = $('<a class="leaflet-bar-part" title="remove last drawn line/circle/marker" href="#">⎌</a>') | ||||
|     .click(function() { | ||||
|       var last = null; | ||||
|       window.plugin.drawTools.drawnItems.eachLayer(function(l) { | ||||
| @@ -57,7 +57,7 @@ window.plugin.drawTools.addCustomButtons = function() { | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|   var clear = $('<a class="leaflet-bar-part leaflet-bar-part-bottom" title="clear drawings" href="#">✗</a>') | ||||
|   var clear = $('<a class="leaflet-bar-part leaflet-bar-part-bottom" title="clear ALL drawings" href="#">✗</a>') | ||||
|     .click(function() { | ||||
|       window.plugin.drawTools.drawnItems.clearLayers(); | ||||
|     } | ||||
| @@ -73,11 +73,29 @@ window.plugin.drawTools.addDrawControl = function() { | ||||
|     polygon: false, | ||||
|  | ||||
|     polyline: { | ||||
|       shapeOptions: DRAW_TOOLS_SHAPE_OPTIONS | ||||
|       shapeOptions: DRAW_TOOLS_SHAPE_OPTIONS, | ||||
|       title: 'Add a (poly) line.\n\n' | ||||
|         + 'Click on the button, then click on the map to\n' | ||||
|         + 'define the start of the line. Continue click-\n' | ||||
|         + 'ing to draw the line you want. Click the last\n' | ||||
|         + 'point of the line (a small white rectangle) to\n' | ||||
|         + 'finish. Double clicking also works.' | ||||
|     }, | ||||
|  | ||||
|     circle: { | ||||
|       shapeOptions: DRAW_TOOLS_SHAPE_OPTIONS | ||||
|       shapeOptions: DRAW_TOOLS_SHAPE_OPTIONS, | ||||
|       title: 'Add a circle.\n\n' | ||||
|         + 'Click on the button, then click-AND-HOLD on the\n' | ||||
|         + 'map where the circle’s center should be. Move\n' | ||||
|         + 'the mouse to control the radius. Release the mouse\n' | ||||
|         + 'to finish.' | ||||
|     }, | ||||
|  | ||||
|     marker: { | ||||
|       title: 'Add a marker.\n\n' | ||||
|         + 'Click on the button, then click on the map where\n' | ||||
|         + 'you want the marker to appear. You can drag the\n' | ||||
|         + 'marker around after it has been placed.' | ||||
|     } | ||||
|   }); | ||||
|   map.addControl(drawControl); | ||||
| @@ -135,14 +153,11 @@ window.plugin.drawTools.enhancePolyLine = function() { | ||||
|   } | ||||
|  | ||||
|   // remove polyline markers because they get in the way | ||||
|   L.Polyline.Draw.prototype._updateMarkerHandlerOld = L.Polyline.Draw.prototype._updateMarkerHandler; | ||||
|   L.Polyline.Draw.prototype._updateMarkerHandler = function() { | ||||
|     if(!this._markers) return; | ||||
|  | ||||
|     if(this._markers.length >= 2) | ||||
|       this._markerGroup.removeLayer(this._markers.shift()); | ||||
|  | ||||
|     if(this._markers.length >= 1) | ||||
|       this._markers[this._markers.length - 1].on('click', this._finishShape, this); | ||||
|     this._updateMarkerHandlerOld(); | ||||
|     if (this._markers.length > 1) | ||||
|       this._markerGroup.removeLayer(this._markers[this._markers.length - 2]); | ||||
|   } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -103,7 +103,9 @@ window.plugin.portalWeakness.portalAdded = function(data) { | ||||
|       var params = {fillColor: color, fillOpacity: fill_opacity, radius: data.portal.options.radius+1}; | ||||
|       if(resCount<8) | ||||
|       { | ||||
|         params["dashArray"] = "4,6"; | ||||
|         // Hole per missing resonator | ||||
|         var dash = new Array(8-resCount + 1).join("1,4,") + "100,0" | ||||
|         params["dashArray"] = dash; | ||||
|       } | ||||
|       data.portal.setStyle(params); | ||||
|     } | ||||
|   | ||||
| @@ -18,6 +18,7 @@ body:after { | ||||
|  | ||||
| html, body, #map { | ||||
|   height: 100%; | ||||
|   width: 100%; | ||||
| } | ||||
|  | ||||
| body { | ||||
| @@ -411,11 +412,14 @@ h3 { | ||||
|  | ||||
| .imgpreview { | ||||
|   height: 200px; | ||||
|   background: no-repeat center center; | ||||
|   background-size: contain; | ||||
|   cursor: help; | ||||
|   overflow: hidden; | ||||
| } | ||||
|  | ||||
| .imgpreview img { | ||||
|   cursor: help; | ||||
| .imgpreview img.hide { | ||||
|   display: none; | ||||
| } | ||||
|  | ||||
| #level { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user