Skip to content

Bookmarklet

Evan Solomon edited this page Jun 5, 2013 · 3 revisions

You can use IsValid from any web page that has data you want to use. Grab the bookmarklet from the footer on IsValid.org and drag it to your browser toolbar. When you're on the page you want to use data from, click the bookmarklet and follow the instructions at the top of the page. The steps to use it are:

  1. Click the bookmarklet
  2. Click your control samples
  3. Click your control conversions
  4. Click your experiment samples
  5. Click your experiment conversions

This will open a new tab with your IsValid results.

If you prefer, you can manually create the bookmarklet using this URL:

javascript:(function(){var e;e={init:function(){var t;return window.jQuery?e.ready():(t=document.createElement("script"),t.type="text/javascript",t.src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js",t.onload=t.onreadystatechange=function(){return this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState?void 0:e.ready()},document.getElementsByTagName("head")[0].appendChild(t))},ready:function(){return e.reset(),e.header.create(),jQuery(document).click(e.click),jQuery("*").hover(e.mouseEnter,e.mouseLeave)},click:function(t){var n,r;return r=t.target.innerHTML,n=parseInt(r.replace(/,/g,""),10),e.selectable(n)?(e.selected.push(n),jQuery(t.target).css("background-color","rgba(50, 200, 80, 0.7)").addClass("isvalid-clicked"),jQuery(".isvalid-steps").text(e.nextStep()),4===e.selected.length&&(window.open("http://isvalid.org/?sc="+e.selected[0]+"&cc="+e.selected[1]+"&se="+e.selected[2]+"&ce="+e.selected[3]),e.reset()),t.target.style.cursor="default",e.header.update(),!1):void 0},mouseLeave:function(e){var t;return t=jQuery(this),t.hasClass("isvalid-clicked")||t.hasClass("isvalid-steps")||t.css("background-color",""),e.target.style.cursor="default"},mouseEnter:function(t){var n,r,i;return n=jQuery(this),!n.hasClass("isvalid-clicked")&&(i=t.target.innerHTML,r=parseInt(i.replace(/,/g,""),10),e.selectable(r))?(t.stopPropagation(),n.css("background-color","rgba(50, 200, 80, 0.25)"),t.target.style.cursor="pointer"):void 0},selectable:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},nextStep:function(){var t;switch(t=void 0,e.selected.length){case 0:t="Control samples";break;case 1:t="Control conversions";break;case 2:t="Experiment samples";break;case 3:t="Experiment conversions";break;default:t="This should never happen"}return"Select: "+t},header:{create:function(){var e;return e=jQuery("<div>"),e.css({top:"0px",left:"0px","background-color":"rgba(50, 200, 80, 0.8)","z-index":"10000",width:"100%",height:"60px",position:"fixed","text-align":"center","padding-top":"20px","font-size":"30px"}),e.addClass("isvalid-steps"),e.prependTo("body"),this.update()},update:function(){return jQuery(".isvalid-steps").text(e.nextStep())}},reset:function(){return jQuery(".isvalid-clicked").removeClass("isvalid-clicked").css("background-color",""),jQuery(document).unbind("click",e.click),jQuery("*").unbind("mouseleave",e.mouseLeave).unbind("mouseenter",e.mouseEnter),jQuery(".isvalid-steps").remove(),e.selected=[]}},e.init()}).call(this);
Clone this wiki locally
You can’t perform that action at this time.