Substitutions that make reading the news more fun (http://xkcd.com/1288/)
Include the following in the <head>
of your document:
<script src="dist/xkcd.substitutions.min.js"></script>
OR if you are using a module loader like RequireJS, including the following in your main JS file:
require(["substitutions"], function (Substitutions) {
});
To initialize the plugin, call:
Substitutions.init();
This plugin is only meant to reflect the phrases included in the xkcd comic. If you want to add more, add them directly to the Substitutions.vars.phrases
array:
Substitutions.vars.phrases.push({
search: "foo",
replace: "bar"
});
A Chrome extension implementation of the plugin is also included. To package on your own, follow the instructions here.