Skip to content

Commit

Permalink
testing backfill
Browse files Browse the repository at this point in the history
  • Loading branch information
acburst committed Jun 6, 2019
1 parent 0fc8aee commit 292c76d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
32 changes: 16 additions & 16 deletions docs/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@
}, 100);

// BuySellAds Detection
var $bsa = $('.buysellads'),
$timesToCheck = 3;
function checkForChanges() {
if (!$bsa.find('#carbonads').length) {
$timesToCheck -= 1;
if ($timesToCheck >= 0) {
setTimeout(checkForChanges, 500);
} else {
var donateAd = $(
'<div id="carbonads"><span><a class="carbon-text" href="#!" onclick="document.getElementById(\'paypal-donate\').submit();"><img src="images/donate.png" /> Help support us by turning off adblock. If you still prefer to keep adblock on for this page but still want to support us, feel free to donate. Any little bit helps.</a></form></span></div>'
);
// var $bsa = $('.buysellads'),
// $timesToCheck = 3;
// function checkForChanges() {
// if (!$bsa.find('#carbonads').length) {
// $timesToCheck -= 1;
// if ($timesToCheck >= 0) {
// setTimeout(checkForChanges, 500);
// } else {
// var donateAd = $(
// '<div id="carbonads"><span><a class="carbon-text" href="#!" onclick="document.getElementById(\'paypal-donate\').submit();"><img src="images/donate.png" /> Help support us by turning off adblock. If you still prefer to keep adblock on for this page but still want to support us, feel free to donate. Any little bit helps.</a></form></span></div>'
// );

$bsa.append(donateAd);
}
}
}
checkForChanges();
// $bsa.append(donateAd);
// }
// }
// }
// checkForChanges();

// BuySellAds Demos close button.
$('.buysellads.buysellads-demo .close').on('click', function() {
Expand Down
5 changes: 3 additions & 2 deletions jade/index/index_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ <h4 class="light">A modern responsive front-end framework based on Material Desi
<div class="row center"><a class="current-version-number" href="https://github.com/Dogfalo/materialize">Release: 1.0.0</a></div>
<div class="row center">
<div class="buysellads-header buysellads-homepage">
<!-- CarbonAds Zone Code -->
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CKYIK27J&placement=materializecss" id="_carbonads_js"></script>
<!-- BuySellAds Zone Code -->
<div id="bsap_1308711" class="bsarocks bsap_a83f7725359c0998dbd102b738abb960"></div>
<!-- End BuySellAds Zone Code -->
</div>
</div>
<br>
Expand Down
3 changes: 2 additions & 1 deletion sass/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ code[class*="language-"] {
margin-top: 42px;
}

#carbonads {
#carbonads,
#bsap_1308711 {
max-width: 150px;
display: inline-block;
position: relative;
Expand Down

0 comments on commit 292c76d

Please sign in to comment.