From 8b93b234134423b36e35d79f45ec012b2ae850bc Mon Sep 17 00:00:00 2001 From: anekos Date: Fri, 28 Jan 2011 19:45:39 +0900 Subject: YouTube変更に対応 --- twittperator.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'twittperator.js') diff --git a/twittperator.js b/twittperator.js index a5918ec..c0e56bd 100644 --- a/twittperator.js +++ b/twittperator.js @@ -1815,9 +1815,16 @@ let PLUGIN_INFO = let ugly = { __noSuchMethod__: function (name, args) originalPath[name].apply(originalPath, args), - toString: - function() - (parseInt(Error().stack.match(/io.js:(\d+)/)[1], 10) < 100 ? originalPath : hackedPath) + toString: function() { + function isFile (caller) { + if (!caller) + return false; + if (caller === io.File) + return true; + return isFile(caller.caller); + } + return isFile(arguments.callee.caller) ? originalPath : hackedPath; + } }; try { -- cgit v1.2.3