Is there a way to prevent abominations like www.powerpedia.org, which put Wikipedia in a frame with their own adverts? While that particular site is probably not very important, I can see this becoming more of an issue. Would it be possible for Wikipedia pages to use that lovely bit of Javascript so common nowadays, which automatically breaks out of frames? It looks something like:
<script language="JavaScript"> <!--
function SymError() { return true; }
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes) { return (new Object()); }
window.open = SymWinOpen;
//--> </script>
<body onload="var SymTmpWinOpen = window.open; window.open = SymWinOpen; delayedreload(); window.open = SymTmpWinOpen;">
On Mar 1, 2004, at 17:44, Allan Crossman wrote:
Is there a way to prevent abominations like www.powerpedia.org, which put Wikipedia in a frame with their own adverts? While that particular site is probably not very important, I can see this becoming more of an issue. Would it be possible for Wikipedia pages to use that lovely bit of Javascript so common nowadays, which automatically breaks out of frames?
Yuck! Okay, I've added a quick anti-frames check. (You may have to reload to get wikibits.js to update.)
if( window.top != window ) window.top.location = window.location;
It works in the following browsers I tested: Safari 1.2/Mac Konqueror 3.2.0/Unix Firefox 0.8/Win Mozilla 1.2/Mac MSIE 6.0/Win Opera 6/Mac Opera 7.23/Win Netscape 4.77/Mac Netscape 3.04/Win
For some reason it doesn't work in MSIE 5.2/Mac: it gives a "Permission denied" error, and doesn't break out of the frameset. It doesn't give the error on a regular page view, just when trying to escape frames.
It looks something like:
<script language="JavaScript"> <!-- function SymError() { return true; } window.onerror = SymError; var SymRealWinOpen = window.open; function SymWinOpen(url, name, attributes) { return (new Object()); } window.open = SymWinOpen; //--> </script>
<body onload="var SymTmpWinOpen = window.open; window.open = SymWinOpen; delayedreload(); window.open = SymTmpWinOpen;">
This looks like it's meant to prevent embedded scripts from opening popup windows.
-- brion vibber (brion @ pobox.com)
"Allan Crossman" a.crossman@blueyonder.co.uk writes:
Is there a way to prevent abominations like www.powerpedia.org, which put Wikipedia in a frame with their own adverts?
It is not allowed what they are doing. Thus, it is a social problem, don't try to solve it with technical messures.
While that particular site is probably not very important, I can see this becoming more of an issue. Would it be possible for Wikipedia pages to use that lovely bit of Javascript so common nowadays, which automatically breaks out of frames?
They can use a prefilter to through away this code, though. Better tell them it is illegal what they are doing and ask them to stop stealing bandwidth.
Karl Eichwalder wrote:
"Allan Crossman" a.crossman@blueyonder.co.uk writes:
Is there a way to prevent abominations like www.powerpedia.org, which put Wikipedia in a frame with their own adverts?
It is not allowed what they are doing. Thus, it is a social problem, don't try to solve it with technical messures.
Technical measures are often effective to solve social problems. It's easier than suing. You're better off locking your door than prosecuting anyone who enters for trespassing.
While that particular site is probably not very important, I can see this becoming more of an issue. Would it be possible for Wikipedia pages to use that lovely bit of Javascript so common nowadays, which automatically breaks out of frames?
They can use a prefilter to through away this code, though. Better tell them it is illegal what they are doing and ask them to stop stealing bandwidth.
If they have to filter the code then it wouldn't be an effective method for stealing bandwidth, would it? It would just be a really inefficient mirror.
-- Tim Starling
Tim Starling wrote:
It is not allowed what they are doing. Thus, it is a social problem, don't try to solve it with technical messures.
Technical measures are often effective to solve social problems. It's easier than suing. You're better off locking your door than prosecuting anyone who enters for trespassing.
I agree.
However, in this case, I'm not really very upset about what they were doing in the first place. Still, I defer to the decision that was made about javascript and frame breaking, because I strongly suspect that the general consensus of the wikipedia community would not agree with me.
--Jimbo
Tim Starling ts4294967296@hotmail.com writes:
If they have to filter the code then it wouldn't be an effective method for stealing bandwidth, would it? It would just be a really inefficient mirror.
Yes, you are right. Sorry.
Karl-
They can use a prefilter to through away this code, though. Better tell them it is illegal what they are doing and ask them to stop stealing bandwidth.
powerpedia.org is not some deliberate scam, it's an attempt by one Wikipedia user to set up a "free energy" section on Wikipedia as a subset of his user pages. That will of course not be allowed. The reason for the ads / frame capture is that he used some cheap ass domain service that is sponsored by doing just that. These domains are normally registered for people's *own* use, not for capturing someone else's content. That's why it is highly unlikely that they would take the effort to circumvent our frame-breaker.
So for now, this seems like a perfectly appropriate solution. Thanks, Brion!
Regards,
Erik
wikitech-l@lists.wikimedia.org