Skip to content

Commit 842b1d8

Browse files
committed
updated
1 parent a51d9ac commit 842b1d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

public/assets/js/popupcode.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jQuery(document).ready(function () {
2222
useMaxWidth: false
2323
}}, ".mermaid-" + i);
2424
});
25+
26+
jQuery("#wpbody,#wpfooter").hide();
27+
document.querySelector('.hookr-flowchart').scrollIntoView({block: 'start', behavior: 'smooth'});
2528
//Go to top
2629
document.querySelector('button.gotop').addEventListener('click', function () {
2730
document.body.scrollTop = document.documentElement.scrollTop = 0;
@@ -32,7 +35,6 @@ jQuery(document).ready(function () {
3235
if (e.checked) {
3336
document.querySelector(".mermaid-" + e.dataset.id).style.display = 'none';
3437
document.querySelector("#" + e.dataset.hook).style.display = 'none';
35-
document.querySelector(".mermaid-download[data-id='" + e.dataset.id + "']").style.display = 'none';
3638
document.querySelector("hr[data-id='" + e.dataset.id + "']").style.display = 'none';
3739
} else {
3840
document.querySelector(".mermaid-" + e.dataset.id).style.display = 'block';
@@ -41,6 +43,5 @@ jQuery(document).ready(function () {
4143
}
4244
});
4345
});
44-
jQuery("#wpbody,#wpfooter").hide();
4546
});
4647
});

public/class-hook-flowchart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function print_hookr_flowchart() {
263263
}
264264
}
265265

266-
echo '<style>.hookr-flowchart {z-index: 9999;position: absolute;}.wp-admin .hookr-flowchart{margin-left: 160px;top:30px;}</style>'
266+
echo '<style>.hookr-flowchart {z-index: 9999;position: absolute;background: white;}.wp-admin .hookr-flowchart{background: #f1f1f1;margin-left: 160px;top:30px;}</style>'
267267
. '<div class="hookr-flowchart" style="padding-left:20px;display:none;z-index:9999;">'
268268
. '<h1>Hook Flowchart</h1><h3>' . "\n"
269269
. __( 'Use ctrl + f to use your browser search function or click on that buttons to jump to the parent hook, check the hook to hide', $this->get_plugin_slug() ) . '</h3><span class="buttons"></span>' . "\n"

0 commit comments

Comments
 (0)