Skip to content

Commit

Permalink
Initial Commit.Make trump drumpf again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishanth Vijayan committed Feb 29, 2016
0 parents commit 85c3e83
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Drumpfinator
Replace Trump with Drumpf
1 change: 1 addition & 0 deletions data/replacer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.body.innerHTML = document.body.innerHTML.replace(/trump/g, 'drumpf').replace(/Trump/g, 'Drumpf');
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var self = require("sdk/self");
var pageMod = require("sdk/page-mod");

pageMod.PageMod({
include: "*",
contentScriptFile: self.data.url("replacer.js")
});
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "Drumpfinator",
"name": "Drumpfinator",
"version": "0.0.1",
"description": "Add this to your browser and replace all instances of Trump with Drumpf.",
"main": "index.js",
"author": "Nishanth Vijayan",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1"
},
"license": "MIT",
"keywords": [
"jetpack"
]
}
19 changes: 19 additions & 0 deletions test/test-index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var main = require("../");

exports["test main"] = function(assert) {
assert.pass("Unit test running!");
};

exports["test main async"] = function(assert, done) {
assert.pass("async Unit test running!");
done();
};

exports["test dummy"] = function(assert, done) {
main.dummy("foo", function(text) {
assert.ok((text === "foo"), "Is the text actually 'foo'");
done();
});
};

require("sdk/test").run(exports);

0 comments on commit 85c3e83

Please sign in to comment.