diff options
author | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
---|---|---|
committer | Barak Korren <[email protected]> | 2013-04-02 20:38:07 +0300 |
commit | 58a2577d48790c79adfd44bcfd662c980ce6cfe4 (patch) | |
tree | 523d814ea0b7b6f617fe515b186099c6e83fed72 /lib/dojo/request/handlers.js.uncompressed.js | |
parent | e470a273cf09562fb2f9c0c899002303f19c8d16 (diff) | |
parent | cc332603431102a682feda22b9cf0093a29f0176 (diff) |
Merge branch 'master' of https://github.com/gothfox/Tiny-Tiny-RSS.git
Diffstat (limited to 'lib/dojo/request/handlers.js.uncompressed.js')
-rw-r--r-- | lib/dojo/request/handlers.js.uncompressed.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/dojo/request/handlers.js.uncompressed.js b/lib/dojo/request/handlers.js.uncompressed.js deleted file mode 100644 index 7c0ed8302..000000000 --- a/lib/dojo/request/handlers.js.uncompressed.js +++ /dev/null @@ -1,62 +0,0 @@ -define("dojo/request/handlers", [ - '../json', - '../_base/kernel', - '../_base/array', - '../has' -], function(JSON, kernel, array, has){ - has.add('activex', typeof ActiveXObject !== 'undefined'); - - var handleXML; - if(has('activex')){ - // GUIDs obtained from http://msdn.microsoft.com/en-us/library/ms757837(VS.85).aspx - var dp = [ - 'Msxml2.DOMDocument.6.0', - 'Msxml2.DOMDocument.4.0', - 'MSXML2.DOMDocument.3.0', - 'MSXML.DOMDocument' // 2.0 - ]; - - handleXML = function(response){ - var result = response.data; - - if(!result || !result.documentElement){ - var text = response.text; - array.some(dp, function(p){ - try{ - var dom = new ActiveXObject(p); - dom.async = false; - dom.loadXML(text); - result = dom; - }catch(e){ return false; } - return true; - }); - } - - return result; - }; - } - - var handlers = { - 'javascript': function(response){ - return kernel.eval(response.text || ''); - }, - 'json': function(response){ - return JSON.parse(response.text || null); - }, - 'xml': handleXML - }; - - function handle(response){ - var handler = handlers[response.options.handleAs]; - - response.data = handler ? handler(response) : (response.data || response.text); - - return response; - } - - handle.register = function(name, handler){ - handlers[name] = handler; - }; - - return handle; -}); |