Created
September 27, 2016 07:50
-
-
Save kosugi/70d63fb4b5fdd4c1d6506034458f81fe to your computer and use it in GitHub Desktop.
bookmarklet for moving between Ingress Mission Map and Ingress Intel Map alternately
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // original source | |
| (function(host, x) { | |
| if (host === 'ingressmm.com') { | |
| x = Map.getCenter(); | |
| location.href = ['https://www.ingress.com/intel?ll=', x.lat(), ',', x.lng(), '&z=', Map.getZoom()].join(''); | |
| } | |
| else if (host === 'www.ingress.com') { | |
| x = document.cookie.split(';').reduce(function(ps, c) { | |
| if (c.match(/\s*\bingress.intelmap.(\w+)=([-\+\d\.]+)\b\s*/)) { | |
| ps[RegExp.$1] = RegExp.$2; | |
| } | |
| return ps; | |
| }, {}); | |
| location.href=['https://ingressmm.com/?pos=', x['lat'], ',', x['lng'], '&zoom=', x['zoom']].join('') | |
| } | |
| })(location.host) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(host,x){if(host==='ingressmm.com'){x=Map.getCenter();location.href=['https://www.ingress.com/intel?ll=',x.lat(),',',x.lng(),'&z=',Map.getZoom()].join('');}else%20if(host==='www.ingress.com'){x=document.cookie.split(';').reduce(function(ps,c){if(c.match(/\s*\bingress.intelmap.(\w+)=([-\+\d\.]+)\b\s*/)){ps[RegExp.$1]=RegExp.$2;}return%20ps;},{});location.href=['https://ingressmm.com/?pos=',x['lat'],',',x['lng'],'&zoom=',x['zoom']].join('')}})(location.host) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment