Add antiproxying protection.
Try to prevent malicious sites like danbooru.me or idanbooru.com from proxying our site and inserting ads. If we detect that we're not running on the real site, then we redirect to the real site.
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
import Cookie from './cookie'
|
||||
|
||||
$(function() {
|
||||
$("#hide-upgrade-account-notice").on("click.danbooru", function(e) {
|
||||
$("#upgrade-account-notice").hide();
|
||||
Cookie.put('hide_upgrade_account_notice', '1', 7);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#hide-dmail-notice").on("click.danbooru", function(e) {
|
||||
var $dmail_notice = $("#dmail-notice");
|
||||
$dmail_notice.hide();
|
||||
var dmail_id = $dmail_notice.data("id");
|
||||
Cookie.put("hide_dmail_notice", dmail_id);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#close-notice-link").on("click.danbooru", function(e) {
|
||||
$('#notice').fadeOut("fast");
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
window.submitInvisibleRecaptchaForm = function () {
|
||||
document.getElementById("signup-form").submit();
|
||||
}
|
||||
Reference in New Issue
Block a user