Skip navigation.

exploreopera

| Help

Sign up | Help

deviant mousedown

, , ,

Understanding other people's workarounds can be simply impossible. Take this example from the popular creative forum deviantART: if a member tries submitting a new entry from Opera, it will appear impossible to upload files because the "Choose" button does nothing when clicked. (Tabbing to it and pressing enter will work, but who'd think of that..)

The reason is buried deep inside this JS file:
if (window.browser && (browser.isGecko || browser.isOpera)) {
     uploadForm.onmousedown = function () { return false; }; // firefox only - screws up other browsers
}

So this "Firefox only" workaround against an unspecified problem I can't begin to understand is also applied to Opera - with the fatal result that we ignore any mouse clicks inside the upload form because the script cancels mousedown. I'm not sure who's deviating from what here..

(As an aside, code like this makes me pretty curious - what will show up in the site if I throw in a small user JS to set deviantART.pageData.i_am_super_privileged to true?
// most awesome hack ever
if (!path[1] && whoosh[0] == 'Fan Art' && deviantART.pageData && deviantART.pageData.i_am_super_privileged)
source)

A malicious thought: how to imagine a security issuethe_future.exe

Comments

avatar

Originally posted by hallvors:

I'm not sure who's deviating from what here..

Lol, does that "awesome hack" really work? I'll have to read this later when I'm completely capable, lol. Looks good though. Those Deviants...

By kyleabaker, # 7. November 2007, 09:40:21

avatar
if i wrote that code, setting it to true would ban your account or at least flag you as an evil hacker :>
I have to remember that one :wink:

By dduenker, # 7. November 2007, 10:32:02

avatar
LOL. Yes, i_am_super_privileged could be used as a sort of honey pot to detect dishonest users :-p Well, I sure hope they *do* check things on the server side, otherwise it would be too easy :smile:

By hallvors, # 7. November 2007, 11:20:56

avatar
// firefox only - screws up other browsers
Am I reading that incorrectly or is that function supposed to screw up other browsers? :confused:

By scipio, # 7. November 2007, 17:44:24

avatar
@scipio: :lol:

@hallvors: I suspect FF might propagade the event despite mousedown returning false. What the workaround was for... er... no idea :wink: I think in that case the form code might be useful...

By _Grey_, # 8. November 2007, 14:10:41

avatar
How are you? From Stella.

By Cornflower, # 21. November 2007, 01:23:39

avatar
Those dam bastards! :furious:
Shame on them!

By Achrintist, # 1. April 2008, 23:32:00

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.