|
|
Safari 5 – first impressions (Page 2)
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by slugslugslug
Nice! But is it possible to combine those into one extension with options to toggle the two features? For that matter, maybe you and the Facebook ad-blocking guy could put all three into a “make Facebook less annoying” extension.
These were just tests, I'm thinking of making one big Facebook Zen plugin
Three hours between a lament and being an official Apple developer with a signed electronic certificate and two Safari 5 plugins? Not bad. The web page took the longest to create in this process btw
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by Person Man
How about an extension that blocks the Facebook social plugin from sites like CNN?
Looking in to this right now. Depending on how this is implemented it should be possible.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
OK, here's a beta version of the Facebook Zen extension:
http://erikveland.com/safari/extensi...safariextz.zip
It is an all or nothing affair right now (there are checkboxes in the settings, but they don't do anything at the moment).
It blocks the Social Graph on external sites, the suggestions box, get connected box AND the ads.
Please get back to me with any improvements or inclusions you'd like to see. If anyone could help me with the JS for turning the stylesheets on and off in the plugin that would be helpful too
(
Last edited by - - e r i k - -; Jun 9, 2010 at 11:02 PM.
)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2003
Location: Southern, NJ (near Philly YO!)
Status:
Offline
|
|
For me I can't watch any YouTube videos. Some Flash video works some don't. What could be the problem? Anyone know? I repaired permissions, reinstalled, removed preferences, ugghh. Not a good update for me.
|
MacBook Pro 15" i7 ~ Snow Leopard ~ iPhone 4 - 16Gb
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2002
Location: Durham, NC
Status:
Offline
|
|
Originally Posted by - - e r i k - -
These were just tests, I'm thinking of making one big Facebook Zen plugin
Three hours between a lament and being an official Apple developer with a signed electronic certificate and two Safari 5 plugins? Not bad. The web page took the longest to create in this process btw
Originally Posted by - - e r i k - -
It blocks the Social Graph on external sites, the suggestions box, get connected box AND the ads.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2002
Location: Durham, NC
Status:
Offline
|
|
Oh hey, Erik, two things:
1) Do you have any way to change MIME type mappings on your host? When you click a .safariextz link, it comes through as garbled text. (I’m not sure what the MIME should be, maybe there’s a generic “this is not text” that would work?)
2) The link in your post omits the “.com”
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jul 2004
Location: Toronto
Status:
Offline
|
|
I'm surprised Apple has added extensions. It always seemed they were avoiding them on purpose.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
OK, I am definitely going to need some help with the JS for the settings. Being a JS noob local storage, setting retrieval and DOM insertion is a black art for me.
I believe these are the basic building blocks I need, but I need to put them together in a cohesive script:
Code:
var myAdblock
function adblockChanged {
if (event.key == "adblock")
{
myAdblock=event.newValue;
}
}
safari.self.addEventListener("change",adblockChanged,false);
var theHead = document.head ;
// create a stylesheet link and insert it at the end of the head
var element = document.createElement("link");
element.rel = "stylesheet";
element.type = "text/css";
element.href = "adblock.css";
theHead.insertBefore(element, theHead.lastChild);
I can't find any other extension that uses settings so I can prod how they are doing it either.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Code:
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
}
else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet")
fileref.setAttribute("type", "text/css")
fileref.setAttribute("href", filename)
}
Try it this way....
Are you getting error messages doing it either way? What are they?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Apologies if I didn't make it clear. I need to read the settings from the settings.plist to toggle different stylesheets on and off. See Apple's documentation on how to read those settings.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
erik: I'm coming into this in the middle and don't have time to read that entire page now, but is putting all of your CSS into a single file and then simply hiding the regions you don't want via display:none an option?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by besson3c
erik: I'm coming into this in the middle and don't have time to read that entire page now, but is putting all of your CSS into a single file and then simply hiding the regions you don't want via display:none an option?
That's what I am doing now (or rather just including all of the stylesheets in the extensions). I need a JavaScript to read the settings in the settings.plist (set by the extension) so I can toggle the stylesheets on and off individually.
Say if some people want to see the social graph on other websites, but block everything on facebook.com for instance.
Once I have this in place I'm going to write styles that turn on and off pretty much any element of FB, including chat etc.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by - - e r i k - -
That's what I am doing now (or rather just including all of the stylesheets in the extensions). I need a JavaScript to read the settings in the settings.plist (set by the extension) so I can toggle the stylesheets on and off individually.
Say if some people want to see the social graph on other websites, but block everything on facebook.com for instance.
Once I have this in place I'm going to write styles that turn on and off pretty much any element of FB, including chat etc.
I don't think you understand what I'm saying.
You are taking about stylesheet files, right? Or, do you mean stylesheet rules within a single external stylesheet file? If the former, what I'm suggesting is that you combine all of your CSS into a single file and use the CSS rules themselves to determine what rules should be invoked depending on the context (for instance, the class or ID of the parent node). Setting the visibility of a node via Javascript is very easy, and you can also use your CSS rules and some parent class/ID to do this as well so that you don't have to use JS at all.
The problem with loading entire stylesheet files dynamically via Javascript is how these are respected is different in IE and W3C browsers. In one the rules that are loaded last have priority, in the other it is the reverse. As a workaround there are toolkits such as YUI Loader which manage this for you, but I'm assuming you don't want to delve into that for something this simple.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Seeing as this is a Safari 5 extension I don't think that IE will matter here
I see that combining it into one stylesheet and just using JS to toggle the classes on and off would be advantageous however.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
What I have done is set all the styles to be body.fbzen foo {…} and the css is all loaded up by the extension. Now I just need a JS to read the settings from settings.plist and toggle them on and off accordingly.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Feb 2004
Location: Earth
Status:
Offline
|
|
Originally Posted by slugslugslug
I’m not sure what you mean “lose the tabs history”. With the option on in Glims, Cmd-Z once does bring up the last closed tab twice. But subsequent Cmd-Zs will keep restoring other closed tabs from the same window. On the other hand, Glims seems to no-longer auto-reload previous tabs when I launch Safari. Is that what you’re referring to?
That's what I was implying by saying one can go back multiple times using Glims.
By loosing the tabs history, I mean that all past pages/sites related to that specific tab are no longer recalled when reopened. Only the last viewed page. Say you were on the forum and hit multiple sections etc. all within the same tab. When that last tab is reopened, however, you can't hit the back button etc. to browse where you went prior. Still, as I said, Glims operates in the same manner. It's just something that Saft and Chrome have that I'd like to see adopted. Perhaps a future extension will eventually offer this functionality.
Unfortunately, like I said, the session auto-reload is gone for me. OTOH, I see that somebody’s already made an extension for that (the tiny gray link at the bottom of that page.)
The auto-reload via Glims is busted for everyone it seems. I've also installed that extension, but it's a bit glitchy (ignores multiple windows at restore for one). Hopefully, an update will be forthcoming.
(
Last edited by Meritocracy; Jun 10, 2010 at 01:47 AM.
)
|
What exactly is rotten in Denmark?
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: May 2000
Location: Santa Rosa, CA
Status:
Offline
|
|
I hope Reader gets added to mobile Safari soon. I do most of my web browsing on the iPad.
|
Slick shoes?! Are you crazy?!
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by - - e r i k - -
What I have done is set all the styles to be body.fbzen foo {…} and the css is all loaded up by the extension. Now I just need a JS to read the settings from settings.plist and toggle them on and off accordingly.
What I would do is load the Prototype Javascript library and then:
$('cssID').addClassName('hidden');
$('cssID').removeClassName('hidden') and $('cssID').hasClassName('hidden') also work.
create a CSS class .hidden with display:none. You can find a pure JS function to add/remove classes, change individual CSS properties, etc. but using a toolkit like Prototype or jQuery will reduce all of this to one line of code.
If it were me though, I probably wouldn't use Javascript at all... I would just use CSS to define properties for specific sections (i.e. non-global styles). I'm not understand why this isn't an option.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Feb 2004
Location: Earth
Status:
Offline
|
|
Originally Posted by TETENAL
For me Youtube disables Safari's video controls, and unfortunately Youtube's fullscreen button only fills the window. Where Safari's video controls are available, fullscreen does retain the correct aspect ratio.
My experience with YouTube using ClickToFlash to load H.264 video is that the fullscreen button stretches to match one's screen size. Which, on a widescreen display distorts many videos.
|
What exactly is rotten in Denmark?
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by besson3c
What I would do is load the Prototype Javascript library and then:
$('cssID').addClassName('hidden');
$('cssID').removeClassName('hidden') and $('cssID').hasClassName('hidden') also work.
create a CSS class .hidden with display:none. You can find a pure JS function to add/remove classes, change individual CSS properties, etc. but using a toolkit like Prototype or jQuery will reduce all of this to one line of code.
Since this will be loaded on every page load in Safari it needs to be lightweight. Loading jQuery or even Prototype would be way overkill.
Originally Posted by besson3c
If it were me though, I probably wouldn't use Javascript at all... I would just use CSS to define properties for specific sections (i.e. non-global styles). I'm not understand why this isn't an option.
Because I need to be able to toggle them on and off in the extension itself. I AM defining properties for specific sections, but I don't necessarily want them active all at once.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2001
Location: Midwest, USA
Status:
Offline
|
|
Originally Posted by slugslugslug
I half agree. I like searching from the address field, but only in the Glims/Saft way of using command-line style keywords (e.g. "g iPod 4" for Google search, "am missing manual" for Amazon). This way I can easily switch between multiple search engines and the browser never thinks I'm searching if I type just one word. ...
And I TOTALLY agree with you. I have used SafariStand for years, and this is one of the many features I just love. Plus, there is a SafariStand plugin for Quicksilver, so any shortcut I create is accessible with a key gesture in Quicksilver. So I can type 'az iphone' to search Amazon for 'iphone' or 'gi iphone 4' to search Google Images for 'iphone 4' directly from Safari's address bar or in Quicksilver. Chrome lets you add custom search engines to the address bar too, which is great (and it's sort of hidden--you have to ctrl/right-click the address bar to find the feature), but I often enter a site with no domain (.com), and Chrome breaks that functionality for me.
|
MacBook C2D 2.0GHz/Combo/2GB RAM
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status:
Offline
|
|
Originally Posted by Art Vandelay
I, for one, can't stand that feature. If I want to search, I'll type in the search field. I hate when I'm using Chrome or Firefox on another computer and I type "apple" or "facebook", for example, and I'm taken to a Google search page instead of having www.*.com added automatically and taken to those sites.
I disagree slightly. Hand it off to the search paths first, then the DNS, THEN auto-append, and only after that, should it become a google search.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status:
Offline
|
|
Yeah, I agree and that is what it does. I was just focusing on the fact that other browsers skip the auto-append and go straight to the google search.
|
Vandelay Industries
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by - - e r i k - -
Since this will be loaded on every page load in Safari it needs to be lightweight. Loading jQuery or even Prototype would be way overkill.
Because I need to be able to toggle them on and off in the extension itself. I AM defining properties for specific sections, but I don't necessarily want them active all at once.
I see...
Here is a way to set the CSS display property via pure JS:
Code:
function toggleLayer( whichLayer )
{
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;
// if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
You can see the attraction to toolkits for simplifying something like this
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Other browsers are financed by Google search. Or owned by Google.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Originally Posted by Art Vandelay
I, for one, can't stand that feature. If I want to search, I'll type in the search field. I hate when I'm using Chrome or Firefox on another computer and I type "apple" or "facebook", for example, and I'm taken to a Google search page instead of having www.*.com added automatically and taken to those sites.
In Chrome, you can actually fix that. Just make a new search engine with the URL set to http://www.%s.com and make it the default.
Still doesn't let you do things like having apple/macosx expand to Apple - Mac OS X Snow Leopard - The world’s most advanced OS, but it's a start.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2008
Status:
Offline
|
|
The new web inspector is pretty nice too. Beats firebug for sure.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by Eyenigma
The new web inspector is pretty nice too. Beats firebug for sure.
Almost, but I don't know why the pulled showing AJAX reloads in the Console. This feature was in earlier versions of the Webkit nightlies, I believe, but it is no more. I still have to use Firebug for when I want to troubleshoot AJAX stuff.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2002
Location: Durham, NC
Status:
Offline
|
|
Originally Posted by - - e r i k - -
Erik, if your host lets you make custom .htaccess files, you shouldn’t have to zip your extension!
Originally Posted by Safari Extensions Tumblr
If you’re hosting your own .safariextz file using Apache, make sure to add:
=====
<IfModule mod_mime.c>
AddType application/x-safari-extension safariextz
</IfModule>
=====
to .htaccess in the hosting directory, or instead of downloading it as a binary file, users may get a page of gibberish when they click on a link to it.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Another requirement for the .htaccess file would be Apache and not lighttpd or nginx or something else...
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
Originally Posted by slugslugslug
Erik, if your host lets you make custom .htaccess files, you shouldn’t have to zip your extension!
I did add safariextz to my MIME types afterwards. I had just already uploaded the zip by then
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2000
Location: Columbus, OH
Status:
Offline
|
|
First impressions were good.
Now not so good.
Safari hangs upon opening. Force quitting is the only way out. Reinstalling seems to fix the hangs for a short time. Then they start again. If Safari doesn't hang on starting, it will hang just clicking on something.
Firefox is starting to show similar behaviour. Since installing Safari requires a reboot, I'm thinking that a common underlying framework has been replaced.
At any rate, I have used the Dock icon force quit method a lot.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
If you're having both Safari and Firefox problems, I don't think it's Safari 5 that caused those issues. If I saw similar behavior on a computer I was on, I'd assume it was a hard drive problem.
|
"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
You can also try using WebKit nightlies instead and see if you experience the same behaviour.
|
|
|
|
|
|
|
|
|
Ham Sandwich
|
|
One out of every hundred pages has a problem.
Let's say that I want to load some other webpage from this forum in Safari 5.
Then... 99% of the time, not a problem.
But 1% of the time, Safari will get stuck on Contacting "forums.macnn.com" and then simply not load anything.
The same happens on YouTube and just about any website you can imagine. (BTW: HTML5 on YouTube is nice in Safari.)
Why is Safari getting stuck?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by Andrej
One out of every hundred pages has a problem.
Let's say that I want to load some other webpage from this forum in Safari 5.
Then... 99% of the time, not a problem.
But 1% of the time, Safari will get stuck on Contacting "forums.macnn.com" and then simply not load anything.
The same happens on YouTube and just about any website you can imagine. (BTW: HTML5 on YouTube is nice in Safari.)
Why is Safari getting stuck?
You are not getting responsive DNS resolution if it is getting stuck at the "contacting" part, assuming this is to be taken at face value. What are your DNS servers set to? Have you tried others?
|
|
|
|
|
|
|
|
|
Ham Sandwich
|
|
I have no idea.
How do I find out what my DNS servers are? What are those?
This problem does not happen in any other browser.
Edit: According to Network Preferences, my DNS Servers are 192.168.1.1 and 192.168.1.1. Huh????
Also, this problem did not seem to occur on campus today.
What gives?
(
Last edited by Ham Sandwich; Jun 17, 2010 at 04:27 PM.
)
|
|
|
|
|
|
|
|
|
Ham Sandwich
|
|
Also: Several pull-down menus don't work in Safari, but do work in other browsers.
For example: Online-Sweepstakes.com | Search Results
The pull-down menu to the right titled "Search Relevance" works in Firefox, but not in Safari. I've already refreshed the page.
The remaining pull-down menus work in both browsers.
My impression right now is that Safari 5 is more buggy than Safari 4, and I think I might go back to Safari 4.
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Apr 2001
Location: Wasilla, Alaska
Status:
Offline
|
|
Originally Posted by Andrej
Also: Several pull-down menus don't work in Safari, but do work in other browsers.
For example: Online-Sweepstakes.com | Search Results
The pull-down menu to the right titled "Search Relevance" works in Firefox, but not in Safari. I've already refreshed the page.
That pull-down works fine for me in Safari..
My impression right now is that Safari 5 is more buggy than Safari 4, and I think I might go back to Safari 4.
I'm not sure how easy that will be (or if it's even possible).
|
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status:
Offline
|
|
Originally Posted by AKcrab
That pull-down works fine for me in Safari.
Interesting. It doesn’t work for me, either.
|
|
|
|
|
|
|
|
|
Ham Sandwich
|
|
Well I just downgraded back to Safari 4, and I can tell you that the "stuck on 'Contacting forums.macnn.com'" problem (amongst other websites) no longer occurs.
The pull-down menu still doesn't work, however.
If Safari could make private browsing default and hide that annoying Google/search toolbar, I'd be more confidently set. Oh well.
P.S. Yes it is possible to downgrade to Safari 4.
[1] If you go into /System/Library/Frameworks/WebKit.framework/Versions/A/Resources/
[2] copy the info.plist file located within this directory, and paste it to some other folder (Documents, etc.),
[3] change the numeric string tags beside CFBundleShortVersionString and CFBundleVersion to 5522 (or some number equal to or lower than 5525.26), and save,
[4] overwrite the old info.plist with this new info.plist file (Authenticate),
[5] then download and install Safari 4.x from Apple's website.
There was a discussion on how to do this on the Discussions.Apple webpage, naturally I can't find it again.
Best of luck troubleshooting this one folks.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Feb 2003
Location: NY²
Status:
Offline
|
|
I've been working on a clean version of YouTube extension.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Nov 2003
Location: Hamburg
Status:
Offline
|
|
Is it just me or does the 2 finger resize on a trackpad not work anymore for pictures (just text) in Safari 5?
|
***
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
I've decided to release Facebook Zen sans usable prefs for now. It now also blocks suggestions on sub-pages, as well as the beta-invite box (seriously, how many of you are going to write a full essay for that crap?).
http://erikveland.com/safari
I have experimented with removing the right column completely, as well as the chat. A full fluid layout is also planned. But for now those are too intrusive to be all activated by default, so I am waiting until I get this preference issue sorted out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|