mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Hide whitelist option if we detected that the domain as blocked due to wildcard blocking
This commit is contained in:
parent
6b3aea933d
commit
11924d425b
1 changed files with 18 additions and 0 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue