commit d0cf9265d78f02b559c55fabffce091285776e23 Author: Jaculabilis Date: Wed Sep 13 18:27:13 2017 -0500 Initial commit diff --git a/append_sorin.js b/append_sorin.js new file mode 100644 index 0000000..def3cb5 --- /dev/null +++ b/append_sorin.js @@ -0,0 +1,23 @@ +(function() { + // Get the article div + var article = document.getElementById("content-detail-page-of-an-article"); + // Rule off the link section that always comes at the end + article.appendChild(document.createElement("hr")); + // Add Sorin's current status as a

+ var status = document.createElement("p"); + status.innerText = "Meanwhile on Innistrad, Sorin Markov is still stuck in a rock."; + article.appendChild(status); + // Pick a catchy one-liner + var slogans = [ + "I can see your house from here.", + "Guess you shouldn't have taken your victory for granite.", + "Looks like you're stuck between a rock and a hard place.", + "Innistrad? More like in-a-strata. Heyoooo!" + ]; + var slogan = slogans[Math.floor(Math.random() * slogans.length)]; + // Add a div for the picture + var figureDiv = document.createElement("div"); + figureDiv.className = "figure-wrapper rtecenter"; + figureDiv.innerHTML = "

Art by Cynthia Sheppard
"; + article.appendChild(figureDiv); +})(); \ No newline at end of file diff --git a/icon128.png b/icon128.png new file mode 100644 index 0000000..4020cdc Binary files /dev/null and b/icon128.png differ diff --git a/icon48.png b/icon48.png new file mode 100644 index 0000000..0571198 Binary files /dev/null and b/icon48.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..2ec637b --- /dev/null +++ b/manifest.json @@ -0,0 +1,23 @@ +{ + "manifest_version": 2, + + "name": "Sorin Status", + "description": "Appends Sorin Markov's current status to every Magic Story article.", + "version": "1.0.1", + "author": "Tim Van Baak", + + "icons": { + "48": "icon48.png", + "128": "icon128.png" + }, + + "content_scripts": [ + { + "matches": [ + "http://magic.wizards.com/en/articles/archive/magic-story/*", + "https://magic.wizards.com/en/articles/archive/magic-story/*" + ], + "js": ["append_sorin.js"] + } + ] +} \ No newline at end of file