Hide whitelist option if we detected that the domain as blocked due to wildcard blocking

This commit is contained in:
DL6ER 2017-01-11 17:07:08 +01:00
parent 6b3aea933d
commit 11924d425b
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 18 additions and 0 deletions

View File

@ -90,6 +90,15 @@ if($uri == "/")
</main>
<footer>Generated <?php echo date('D g:i A, M d'); ?> by Pi-hole <?php echo $piHoleVersion; ?></footer>
<script src="http://pi.hole/admin/scripts/vendor/jquery.min.js"></script>
<script>
(function($) {
var origAppend = $.fn.append;
$.fn.append = function () {
return origAppend.apply(this, arguments).trigger("append");
};
})(jQuery);
</script>
<script src="http://pi.hole/admin/scripts/pi-hole/js/queryads.js"></script>
<script>
function inIframe () {
@ -117,6 +126,15 @@ else
$( "#whitelisting" ).on( "click", function(){ $( "#whitelistingform" ).removeAttr( "hidden" ); });
$( "#output" ).bind("append", function(){
console.log("change");
if($( "#output" ).contents()[0].data.indexOf("Wildcard blocking") !== -1)
{
$( "#whitelisting" ).hide();
$( "#whitelistingform" ).hide();
}
});
function add() {
var domain = $("#domain");
var pw = $("#pw");