Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed hardcoded domains from JS. We now pipe in through the stumpy_…

…domain var by setting a global JS var 'DOMAIN' in the index and then reference that JS var in our scripts. You will no longer need to set your domain as hardcoded into javascript code.
  • Loading branch information...
commit 325246d9523ade931a9355f2dd6774a54dcb7ed0 1 parent 77f9edd
@mutaku authored
View
2  static/bookmarklet.js
@@ -1,5 +1,5 @@
function postUrl(){
w=window,d=document,t=encodeURIComponent(d.title),link=escape(d.location),
- w.open('http://t04u.be/url/?l='+link,'t','status=1,scrollbars=1,location=0,resizable=1,menubar=0,width=200,height=75,toolbar=0');
+ w.open(DOMAIN+'/url/?l='+link,'t','status=1,scrollbars=1,location=0,resizable=1,menubar=0,width=200,height=75,toolbar=0');
}
postUrl();
View
2  static/iframer.js
@@ -22,7 +22,7 @@ function runthis() {
<div id='stumpyframe_veil' style=''>\
<p>Harvesting your Stumps! ...</p>\
</div>\
- <iframe src='http://t04u.be/iframer/' onload=\"$('#stumpyframe iframe').animate({width:'toggle'},500);$('#stumpyframe_veil p').hide(500);\">Enable iFrames.</iframe>\
+ <iframe src='"+DOMAIN+"/iframer/' onload=\"$('#stumpyframe iframe').animate({width:'toggle'},500);$('#stumpyframe_veil p').hide(500);\">Enable iFrames.</iframe>\
<style type='text/css'>\
#stumpyframe {z-index: 850;}\
#stumpyframe_veil { display: none; position: fixed; width: 100%; height: 100%; top: 0; left: 0; cursor: pointer; z-index: 900; }\
View
1  templates/stumpy/index.html
@@ -9,6 +9,7 @@
{% if stumpy_domain %}
<p class=booky>
+ <script>var DOMAIN = "{{ stumpy_domain }}";</script>
<a href="javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://{{ stumpy_domain }}/static/bookmarklet.js';})();">&#8620;&nbsp;Stumpy it!</a>
<a href="javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://{{ stumpy_domain }}/static/iframer.js';})();">&#8620;&nbsp;Harvest Stumps!</a>
</p>
Please sign in to comment.
Something went wrong with that request. Please try again.