Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Open images instead of saving

  • Loading branch information...
commit 5499620de16824f46075a3453300fcc0c71f628c 1 parent d25b00c
@technocoreai authored
Showing with 19 additions and 3 deletions.
  1. +3 −3 Info.plist
  2. +16 −0 content.js
View
6 Info.plist
@@ -5,7 +5,7 @@
<key>Author</key>
<string>Alexey Ermakov</string>
<key>Builder Version</key>
- <string>7534.52.7</string>
+ <string>7534.55.3</string>
<key>CFBundleDisplayName</key>
<string>Ungayify Friendfeed</string>
<key>CFBundleIdentifier</key>
@@ -13,9 +13,9 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
- <string>2.0</string>
+ <string>2.1</string>
<key>CFBundleVersion</key>
- <string>7</string>
+ <string>8</string>
<key>Chrome</key>
<dict>
<key>Global Page</key>
View
16 content.js
@@ -31,10 +31,26 @@ safari.self.addEventListener("message", function(event) {
}, false);
safari.self.tab.dispatchMessage("get-replacement-hash");
+function fixImages() {
+ $("a[href*='m.friendfeed-media.com']").each(function(_, link) {
+ if (!('fixed' in link.dataset)) {
+ link.dataset.fixed = true;
+ $(link).click(function(event) {
+ var wnd = window.open();
+ var img = wnd.document.createElement('img');
+ img.src = link.href;
+ wnd.document.body.appendChild(img);
+ event.preventDefault();
+ });
+ }
+ });
+}
+
$(function() {
ungayify = function() {
ungayifyNodes($(".text, .content, .searchbold"));
ungayifyNodes($(".text a, .content a").filter(function() { return !this.className }));
+ fixImages();
};
ungayify();
Please sign in to comment.
Something went wrong with that request. Please try again.