aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2011-01-28 19:45:39 +0900
committeranekos2011-01-28 19:46:16 +0900
commit8b93b234134423b36e35d79f45ec012b2ae850bc (patch)
treeb3a4b73619b2aba60f34840bfbc4c06244bc759a /twittperator.js
parent84093fd51b8bec20076c6c56df241cee2ed7b7d2 (diff)
downloadvimperator-plugins-8b93b234134423b36e35d79f45ec012b2ae850bc.tar.bz2
YouTube変更に対応
Diffstat (limited to 'twittperator.js')
-rw-r--r--twittperator.js13
1 files changed, 10 insertions, 3 deletions
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 {