X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=dot-files%2F_vimperator%2Fplugin%2Frelative_move_js;h=c5ca14917b00a5fec2568b813bd3502122ca51f1;hp=a75eff3ccf9a08e54bb8b6140369ad2b6614003e;hb=a807b4609220d6a60673008b962d2456d4ccebb7;hpb=61befc31a165034bb00a66f817318bbceca2bacb diff --git a/dot-files/_vimperator/plugin/relative_move_js b/dot-files/_vimperator/plugin/relative_move_js index a75eff3..c5ca149 100644 --- a/dot-files/_vimperator/plugin/relative_move_js +++ b/dot-files/_vimperator/plugin/relative_move_js @@ -1,5 +1,5 @@ // Vimperator plugin: Relative Move -// Version: 0.1 +// Version: 0.3 // // Usage: // If you stay "http://example.com/aaa/bbb/ccc" @@ -28,7 +28,7 @@ function open_path(path, tab){ var win = window.content.window; var loc = win.location; - var splited_path = path.split(/\/+/); + var splited_path = path.toString().split(/\/+/); var up = 0; if(!tab){ @@ -57,7 +57,7 @@ break; case -1: // "./hoge" base = trim_query(loc.href); - path = path.substring(2); + path = path.toString().substring(2); if(base[base.length-1] == "/") url = base + path; else @@ -72,7 +72,7 @@ while(c < up){ if(c > 0) base = base.substr(0, base.length-1); [base] = base.match(/^.*\/(?=[^\/]*$)/); - path = path.substring(3); + path = path.toString().substring(3); c++; } url = base + path;