new plugin ipas-link #118

Merged
merged 2 commits into from Apr 4, 2013

Conversation

Projects
None yet
3 participants
Contributor

Xosofox commented Apr 4, 2013

For opening a portal in IPAS - Ingress Portal Attack Simulator
as seen on http://ipas.graphracer.com/iitc.html

(and adding *.swp to .gitignore)

@Xosofox Xosofox new plugin ipas-link
For opening a portal in IPAS - Ingress Portal Attack Simulator
711fc74

@breunigs breunigs and 1 other commented on an outdated diff Apr 4, 2013

plugins/ipas-link.user.js
+
+function wrapper() {
+// ensure plugin framework is there, even if iitc is not yet loaded
+if(typeof window.plugin !== 'function') window.plugin = function() {};
+
+// PLUGIN START ////////////////////////////////////////////////////////
+
+// use own namespace for plugin
+window.plugin.ipasLink = function() {};
+
+window.plugin.ipasLink.setupCallback = function() {
+ addHook('portalDetailsUpdated', window.plugin.ipasLink.addLink);
+}
+
+window.plugin.ipasLink.addLink = function(d) {
+ $('.linkdetails').append('<aside><a href="http://ipas.graphracer.com/index.html#' + window.plugin.ipasLink.getHash(d.portalDetails) + '" target="ipaswindow">attack!</a></aside>');
@breunigs

breunigs Apr 4, 2013

Contributor

better name this “simulate attack” or so, because “attack!” is really misleading.

@Xosofox

Xosofox Apr 4, 2013

Contributor

You're right! My hope was that a short "attack" would not break to the new line and look that crappy (http://ipas.graphracer.com/images/iitc.jpg)...
So I'll change the link, but need to invetigate how to fix the layout

@jonatkins jonatkins added a commit that referenced this pull request Apr 4, 2013

@jonatkins jonatkins Merge pull request #118 from Xosofox/ipaslink
new plugin ipas-link
b664e0a

@jonatkins jonatkins merged commit b664e0a into iitc-project:master Apr 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment