Last modified: 2006-09-12 17:02:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4662 - Safari detection fails in wikibits.js
Safari detection fails in wikibits.js
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.6.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 4663
  Show dependency treegraph
 
Reported: 2006-01-19 01:18 UTC by Schnargel
Modified: 2006-09-12 17:02 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Schnargel 2006-01-19 01:18:33 UTC
Detection of the Safari browser in skins-1.5/common/wikibits.js is done by the line

 var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1));

At least the current Safari version returns a client string containing

 "applewebkit/417.9 (khtml, like gecko) safari/417.8"

wich fails the case sensitive comparisation with "AppleWebKit".
Comment 1 Brion Vibber 2006-01-19 02:44:45 UTC
Safari sends AppleWebKit, but wikibits.js converts the agent string to lowercase 
before doing comparisons.

Anyway, user-agent sniffing is kinda crappy; what actually uses these variables?
Comment 2 Schnargel 2006-01-19 02:50:51 UTC
It's used for bug 4663. I need to change AppleWebKit to applewebkit and change the line mentioned there to get the toolbar working
Comment 3 Brion Vibber 2006-04-17 08:28:15 UTC
Fixed in r13687 (but you should not use it; most functional 
checks should be based on behavior, not user-agent reporting.)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links