Say Hello to Realtime Collaboration
cssdeck.com
cssdeck.com
The 4th allowed value for html5 iframe sandbox is allow-top-navigation, which allows a script to do window.top.location.href = 'http://google.com and redirect someone like me.
As usual, as soon as HNers are no longer on HN proper, the inner troll comes out.
(function()
{
var proxied = window.alert;
window.alert = function()
{
// replacement code here
// call original function:
proxied.apply(this, arguments);
};
})();If someone really feels like policing it, they can delete the iframe element (in FF, chrome, or opera) and just have access to the editor panes (which means no alerts, redirects, or other nastiness). I'm sure someone can figure out how to write a javascript snippet that will post some text that has been cleaned of all instances of "window.location", "alert", and probably "while". (I would do it myself, but it's 1am here).
If you want to see what arguments are being passed, add a console.dir(arguments); to the code.
Either do it properly or not at all.
edit2- No proof of any security risks, not like I tried any
Maybe either turn off collaboration (which would greatly detract from the value of the demo, I know), or limit things like linking to outside images, Javascript alerts, and more malicious things. With how often everything gets overwritten, it's not as though anyone is going to be able to do anything complex that requires any of those things anyway.
But nice to see how all the trolls play... Maybe this is a real good idea... A contest battelfield for trolls... (as a game)
Some highlights:
window.top.location.href = 'http://www.troll.com;
function troll() { alert('troll'); troll(); } troll();
I was just observing, didn't know I was stumbling on a live canvas when I clicked the link :)
Poor are those who have no way to block alerts tho.
You're absolu
You're absolutely wro (backspaces start)
You
I respectfully disagree
Fun days.EDIT: better dummy conversation
I'd love to use this for teaching HTML but I can't ask my hundreds of teenage students to all create accounts...
Collaborative isn't a must, anything with syntax highlighting and real-time previews will do.
Secondly, it's not a must. Only you can register and share the collaboration URL with your 100s of students.
They can collaborate if they want to, or you can teach them in "Teacher Mode" - registration is not a must!
Hope that clarifies your doubts :)