mirror of
https://github.com/samsonjs/camel3-bookmarklet.git
synced 2026-04-27 14:57:45 +00:00
First commit
This commit is contained in:
commit
3c57b76ba8
3 changed files with 18 additions and 0 deletions
6
bookmarklet.js
Normal file
6
bookmarklet.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
(function() {
|
||||||
|
var urlPrefix = 'http://ca.camelcamelcamel.com/search?sq=';
|
||||||
|
var amazonURL = window.location.href;
|
||||||
|
var url = urlPrefix + encodeURIComponent(amazonURL);
|
||||||
|
window.location = url;
|
||||||
|
}());
|
||||||
6
compile.js
Executable file
6
compile.js
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
var filename = process.argv[2];
|
||||||
|
var code = fs.readFileSync(filename);
|
||||||
|
console.log('javascript:' + encodeURIComponent(code));
|
||||||
6
compile.rb
Executable file
6
compile.rb
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env ruby -w
|
||||||
|
|
||||||
|
require 'cgi'
|
||||||
|
|
||||||
|
encoded_code = CGI.escape(ARGF.read)
|
||||||
|
puts "javascript:#{encoded_code}"
|
||||||
Loading…
Reference in a new issue