Skip to content

Instantly share code, notes, and snippets.

@mosheeshel
mosheeshel / uri.js
Created July 17, 2013 12:59 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@mosheeshel
mosheeshel / gist:6007484
Last active December 19, 2015 19:38 — forked from MichelleGlauser/gist:5323089
getsatisfaction customization code how to add a button to subscribe to a feed (not real product feed)
<!-- Subscribe to all topics. -->
<!-- Steps to a subscribe-to-all-topics button:
1. make a product for all topics, get ID number (87939: http://michelleglauser.jarg0n.com/gsfnmichelle/products/gsfnmichelle_all_topics)
2. make all new topics automatically be assigned to that product by ID number (through a jQuery click on that element)
3. hide that product by ID number
4. make a subscribe button on the front page
5. give the subscribe button a call to the product page's follow button -->
<!-- Header HTML: -->