Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changed url

  • Loading branch information...
commit ce7430f4e497c9ccee4d2678379279501e77da24 0 parents
Christopher Käck authored

Showing 1 changed file with 25 additions and 0 deletions. Show diff stats Hide diff stats

  1. +25 0 reftail.js
25 reftail.js
... ... @@ -0,0 +1,25 @@
  1 +$(document).ready(function() {
  2 +
  3 + function getUrlVars() {
  4 + var vars = {};
  5 + var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
  6 + vars[key] = value;
  7 + });
  8 + return vars;
  9 + }
  10 + ref = getUrlVars()["ref"];
  11 + host = window.location.hostname;
  12 + console.log(ref);
  13 + if (ref !== undefined) {
  14 + $.ajax({
  15 + url: "http://reftail.kejsarmakten.se/add",
  16 + data: {"ref": ref, "host": host }
  17 + });
  18 + }
  19 + $('.tictail_add_to_cart_button').bind('click', function() {
  20 + $.ajax({
  21 + url: "http://reftail.kejsarmakten.se/sell",
  22 + data: {"ref": ref, "host": host, "title":document.title}
  23 + });
  24 + });
  25 +});

0 comments on commit ce7430f

Please sign in to comment.
Something went wrong with that request. Please try again.