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

View file

@ -90,6 +90,15 @@ if($uri == "/")
</main> </main>
<footer>Generated <?php echo date('D g:i A, M d'); ?> by Pi-hole <?php echo $piHoleVersion; ?></footer> <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 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 src="http://pi.hole/admin/scripts/pi-hole/js/queryads.js"></script>
<script> <script>
function inIframe () { function inIframe () {
@ -117,6 +126,15 @@ else
$( "#whitelisting" ).on( "click", function(){ $( "#whitelistingform" ).removeAttr( "hidden" ); }); $( "#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() { function add() {
var domain = $("#domain"); var domain = $("#domain");
var pw = $("#pw"); var pw = $("#pw");