First commit

This commit is contained in:
Sami Samhuri 2022-02-17 21:46:08 -08:00
commit 3c57b76ba8
No known key found for this signature in database
GPG key ID: 4B4195422742FC16
3 changed files with 18 additions and 0 deletions

6
bookmarklet.js Normal file
View 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
View 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
View file

@ -0,0 +1,6 @@
#!/usr/bin/env ruby -w
require 'cgi'
encoded_code = CGI.escape(ARGF.read)
puts "javascript:#{encoded_code}"