Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial version supporting just zeit.de
- Loading branch information
0 parents
commit c00a0ac
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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>Thomas Kollbach</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>FullPage</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>io.bits.safariextension.fullpage</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>Start</key> | ||
<array> | ||
<string>fullpage.js</string> | ||
</array> | ||
</dict> | ||
<key>Whitelist</key> | ||
<array> | ||
<string>http*.://*.zeit.de/*</string> | ||
</array> | ||
</dict> | ||
<key>Description</key> | ||
<string>Displays the full page on news sites by default</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>Website</key> | ||
<string>http://fullpage.bits.io</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Automatically makes news webpages have full page links. | ||
|
||
Supported Sites so far: | ||
|
||
* [zeit.de](http://zeit.de) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
httpsecure.js | ||
Written by toto toto. | ||
Source hosted on Github at https://github.com/toto/FullPage | ||
License: CC BY-SA-NC 3.0, See README.md for more information. | ||
*/ | ||
|
||
function $(q, root, single) { | ||
if (root && typeof root == 'string') { root = $(root, null, true); } | ||
root = root || document; | ||
if (q[0]=='#') { return root.getElementById(q.substr(1)); } | ||
else if (q[0]=='/' || (q[0]=='.' && q[1]=='/')) { | ||
if (single) { return document.evaluate(q, root, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; } | ||
return document.evaluate(q, root, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | ||
} | ||
else if (q[0]=='.') { return root.getElementsByClassName(q.substr(1)); } | ||
return root.getElementsByTagName(q); | ||
} | ||
|
||
function appendAllZeit(){ | ||
var links = $("//a[contains(@href,'zeit.de')]"); | ||
for (var i=0; i < links.snapshotLength; i++) { | ||
if (links.snapshotItem(i).href.indexOf('page=all') == -1) { | ||
links.snapshotItem(i).href = links.snapshotItem(i).href + "?page=all"; | ||
} | ||
|
||
} | ||
} | ||
|
||
|
||
document.addEventListener( | ||
'load', | ||
function() { | ||
appendAllZeit(); | ||
}, | ||
true | ||
); |