LimeChatにprototype.jsの潤いを
LimeChatではwindowとかdocumentが設定されていないので、うまくごまかさないと、prototype.jsが動かない。
以下のコードを評価してから、prototype.jsを評価すれば、prototype.jsが使えるようになる。
var document = { getElementsByTagName : function() { return [ { src : '' } ]; }, createElement : function() { return { appendChild : function() {} }; }, createTextNode : function() {}, createEvent : function() { return { __proto__ : {} }; }, getElementById : function() { return {}; }, write : function() {}, domain : "localhost" }; var window = { document : document, attachEvent: function() {}, setTimeout : function(a, b) { setTimeout(a, b); } }; var navigator = { userAgent : 'LimeChat' }; var location = { protocol : "http:", port : "" }; function Element() {}
ブラウザに依存するコードは使えない、と言うか使うシーンがない、はず。