Skip to content

Commit

Permalink
Create Safari extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexsander Akers committed Jun 25, 2015
1 parent e4d5978 commit 473940f
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 49 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
52 changes: 52 additions & 0 deletions Millennials to Snake People.safariextension/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Author</key>
<string>Alexsander Akers</string>
<key>Builder Version</key>
<string>10600.6.3</string>
<key>CFBundleDisplayName</key>
<string>Millennials to Snake People</string>
<key>CFBundleIdentifier</key>
<string>us.pandamonia.millennials-to-snake-people</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Chrome</key>
<dict/>
<key>Content</key>
<dict>
<key>Scripts</key>
<dict>
<key>End</key>
<array>
<string>content_script.js</string>
</array>
</dict>
</dict>
<key>Description</key>
<string>Learn the sad, sinister truth behind the mysterious Snake People. Who are they? What do they want?</string>
<key>DeveloperIdentifier</key>
<string>94C3W2AV74</string>
<key>ExtensionInfoDictionaryVersion</key>
<string>1.0</string>
<key>Permissions</key>
<dict>
<key>Website Access</key>
<dict>
<key>Include Secure Pages</key>
<true/>
<key>Level</key>
<string>All</string>
</dict>
</dict>
<key>Update Manifest URL</key>
<string>https://a2.github.io/</string>
<key>Website</key>
<string>https://github.com/a2/millennials-to-snake-people</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,20 @@ walk(document.body);

document.title = replaceText(document.title);

function walk(node)
function walk(rootNode)
{
// I stole this function from here:
// http://is.gd/mwZp7E

var child, next;

switch ( node.nodeType )
{
case 1: // Element
case 9: // Document
case 11: // Document fragment
child = node.firstChild;
while ( child )
{
next = child.nextSibling;
walk(child);
child = next;
}
break;

case 3: // Text node
handleText(node);
break;
// Find all the text nodes in rootNode
var walker = document.createTreeWalker(
rootNode,
NodeFilter.SHOW_TEXT,
null,
false
),
node;

// Modify each text node's value
while (node = walker.nextNode()) {
handleText(node);
}
}

Expand Down
Binary file removed MillennialsToSnakePeople.crx
Binary file not shown.
26 changes: 0 additions & 26 deletions Source/manifest.json

This file was deleted.

0 comments on commit 473940f

Please sign in to comment.