# HG changeset patch
# User Shingo W. Kagami
# Date 1266030420 -32400
# Node ID 16fe27af1a8bf8d38ddc517219d6b7285432e84a
# Parent  aa22c1ad000745098d3b358607b45335189d5703
Use content object in copy.js templates.

diff -r aa22c1ad0007 -r 16fe27af1a8b .vimperatorrc
--- a/.vimperatorrc	Wed Feb 03 22:31:35 2010 +0900
+++ b/.vimperatorrc	Sat Feb 13 12:07:00 2010 +0900
@@ -39,10 +39,9 @@
 javascript <<EOM
 (function(){
 function get_tus(w, d) {
-    var win = new XPCNativeWrapper(w.content.window);
-    var s = win.getSelection().getRangeAt(0).toString();
-    var t = liberator.buffer.title;
-    var u = liberator.buffer.URL;
+    var t = content.document.title;
+    var u = content.location.href;
+    var s = content.window.getSelection().getRangeAt(0).toString();
     return [t, u, s];
 }
 liberator.globalVariables.copy_templates = [
@@ -62,7 +61,7 @@
        return t + ":\n  - " + u + (s? ("\n  >>\n  " + s + "\n  <<"): '');
    }},
    { label: 'datestr',  custom: function() {
-       return '[' +  liberator.buffer.URL.match(/\d\d\d\d-\d\d-\d\d-\d+/) + ']';
+       return '[' +  content.location.href.match(/\d\d\d\d-\d\d-\d\d-\d+/) + ']';
    }},
 ];
 })();