Skip to content

Instantly share code, notes, and snippets.

@nyancodeid
Last active June 20, 2018 10:59
Show Gist options
  • Save nyancodeid/0ae76b3145564211fbcf66815632b013 to your computer and use it in GitHub Desktop.
Save nyancodeid/0ae76b3145564211fbcf66815632b013 to your computer and use it in GitHub Desktop.
Terjemahan
jQuery(document).ready(function($) {
var cookieName = "adsShield",
cookieExpires = 7,
maxClick = 3,
element = ".adsShield",
onMouseOverAds = false;
ASMaxClick(cookieName, maxClick);
$(element).hide("fast");
$(element).bind("mouseover", function() {
onMouseOverAds = true
}).bind("mouseout", function() {
onMouseOverAds = false
});
$(window).on("beforeunload", function() {
if (onMouseOverAds && (ASMaxClick(cookieName, maxClick)) {
$(element).hide("fast")
} else {
ASSetCookieAds(cookieName, cookieExpires))
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment