Initial commit
This commit is contained in:
commit
d0cf9265d7
|
@ -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 <p>
|
||||||
|
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 = "<figure><img title=\""" + slogan + ""\" src=\"http://media.wizards.com/2016/images/daily/s7ory4r7_gewRglYA4D.jpg\" class=\"full-page\"><figcaption>Art by <a href=\"http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=visual&action=advanced&artist=+%5b%22Cynthia+Sheppard%22%5d\" target=\"_blank\">Cynthia Sheppard</a></figcaption></figure>";
|
||||||
|
article.appendChild(figureDiv);
|
||||||
|
})();
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
|
@ -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"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue