Skip to content

Commit

Permalink
promote blit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Martin committed Mar 10, 2018
1 parent a161d81 commit 8cb89d0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ design.svg
tests.js
node_modules
npm-debug.log
.idea
Binary file added img/blit-ad1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/blit-ad2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/blit-ad3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ <h2 class="left">Online JSON Compare</h2>

</div>
<div class="ad-container">
<script async type="text/javascript" src="http://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=jsondiffcom" id="_carbonads_js"></script>
<div id="carbonads">
<span>
<span id="ad-wrap" class="carbon-wrap">
<a href="https://blitapp.com?ref=json-diff-txt" class="carbon-text" target="_blank" rel="noopener">Screenshots of websites to your inbox. Try it free.</a>
</span>
</span>
</div>
</div>
<div class="made-by-text"><a href="https://blitapp.com?ref=json-diff" target="_blank" rel="noopener noreferrer">made with ♥ by <img src="img/blit_logo.svg"/></a></div>
</div>
Expand Down Expand Up @@ -92,6 +98,7 @@ <h2 class="left">Online JSON Compare</h2>

</script>
<script>
initAd();
var isLightTheme = localStorage.getItem('lighttheme');
if (isLightTheme) {
enableLightTheme();
Expand Down Expand Up @@ -119,6 +126,12 @@ <h2 class="left">Online JSON Compare</h2>
$('#left-input').on('click', '.input-collapse,.input-split,.input-expand', onPaneResizeLeftClick);
$('#right-input').on('click', '.input-collapse,.input-split,.input-expand', onPaneResizeRightClick);

function initAd() {
var adNum = Math.floor(Math.random() * Math.floor(3)) + 1;
var ad = $('<a href="https://blitapp.com?ref=json-diff-img'+adNum+'" class="carbon-img" target="_blank" rel="noopener"><img src="/img/blit-ad'+adNum+'.png" alt="Blit - Scheduled Website Screenshots" border="0" height="100" width="130" style="max-width: 130px;"></a>');
$('#ad-wrap').prepend(ad);
}

function toggleLightTheme() {
var isLightTheme = localStorage.getItem('lighttheme');
if (isLightTheme) {
Expand Down

0 comments on commit 8cb89d0

Please sign in to comment.