save theme
This commit is contained in:
parent
b59c617a8d
commit
ee532e1329
43
options.php
43
options.php
@ -25,7 +25,7 @@
|
|||||||
<a class="ui icon button item" href="https://nmap.org/man/fr/index.html" target="_blank">
|
<a class="ui icon button item" href="https://nmap.org/man/fr/index.html" target="_blank">
|
||||||
<i class="question circle icon"></i>
|
<i class="question circle icon"></i>
|
||||||
</a>
|
</a>
|
||||||
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre">
|
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre" onclick="toggleTheme()">
|
||||||
<i class="sun icon"></i>
|
<i class="sun icon"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -453,9 +453,9 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<select id="minRTTUnit" class="ui clearable dropdown label"
|
<select id="minRTTUnit" class="ui clearable dropdown label"
|
||||||
oninput="minRTTHidden.value = minRTTNumber.value? minRTTNumber.value+minRTTUnit.value: ''">
|
oninput="minRTTHidden.value = minRTTNumber.value? minRTTNumber.value+minRTTUnit.value: ''">
|
||||||
<option value="">ms</option>
|
<option value="">ms</option>
|
||||||
<option value="s" secondes </option>
|
<option value="s">secondes</option>
|
||||||
<option value="m" minutes </option>
|
<option value="m">minutes</option>
|
||||||
<option value="h" heures </option>
|
<option value="h">heures</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="minRTTHidden" type="hidden" name="--min-rtt-timeout">
|
<input id="minRTTHidden" type="hidden" name="--min-rtt-timeout">
|
||||||
@ -468,9 +468,9 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
||||||
oninput="maxRTTHidden.value = maxRTTNumber.value? maxRTTNumber.value+maxRTTUnit.value: ''">
|
oninput="maxRTTHidden.value = maxRTTNumber.value? maxRTTNumber.value+maxRTTUnit.value: ''">
|
||||||
<option value="">ms</option>
|
<option value="">ms</option>
|
||||||
<option value="s" secondes </option>
|
<option value="s">secondes</option>
|
||||||
<option value="m" minutes </option>
|
<option value="m">minutes</option>
|
||||||
<option value="h" heures </option>
|
<option value="h">heures</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="maxRTTHidden" type="hidden" name="--max-rtt-timeout">
|
<input id="maxRTTHidden" type="hidden" name="--max-rtt-timeout">
|
||||||
@ -492,9 +492,9 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<select id="hostTimoutUnit" class="ui clearable dropdown label"
|
<select id="hostTimoutUnit" class="ui clearable dropdown label"
|
||||||
oninput="hostTimoutHidden.value = hostTimoutNumber.value? hostTimoutNumber.value+hostTimoutUnit.value: ''">
|
oninput="hostTimoutHidden.value = hostTimoutNumber.value? hostTimoutNumber.value+hostTimoutUnit.value: ''">
|
||||||
<option value="">ms</option>
|
<option value="">ms</option>
|
||||||
<option value="s" secondes </option>
|
<option value="s">secondes</option>
|
||||||
<option value="m" minutes </option>
|
<option value="m">minutes</option>
|
||||||
<option value="h" heures </option>
|
<option value="h">heures</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="hostTimoutHidden" type="hidden" name="--host-timeout">
|
<input id="hostTimoutHidden" type="hidden" name="--host-timeout">
|
||||||
@ -509,9 +509,9 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<select id="scanDelayUnit" class="ui clearable dropdown label"
|
<select id="scanDelayUnit" class="ui clearable dropdown label"
|
||||||
oninput="scanDelayHidden.value = scanDelayNumber.value? scanDelayNumber.value+scanDelayUnit.value: ''">
|
oninput="scanDelayHidden.value = scanDelayNumber.value? scanDelayNumber.value+scanDelayUnit.value: ''">
|
||||||
<option value="">ms</option>
|
<option value="">ms</option>
|
||||||
<option value="s" secondes </option>
|
<option value="s">secondes</option>
|
||||||
<option value="m" minutes </option>
|
<option value="m">minutes</option>
|
||||||
<option value="h" heures </option>
|
<option value="h">heures</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="scanDelayHidden" type="hidden" name="--scan-delay">
|
<input id="scanDelayHidden" type="hidden" name="--scan-delay">
|
||||||
@ -524,9 +524,9 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
||||||
oninput="maxRTTHidden.value = maxScanDelay.value? maxScanDelay.value+maxRTTUnit.value: ''">
|
oninput="maxRTTHidden.value = maxScanDelay.value? maxScanDelay.value+maxRTTUnit.value: ''">
|
||||||
<option value="">ms</option>
|
<option value="">ms</option>
|
||||||
<option value="s" secondes </option>
|
<option value="s">secondes</option>
|
||||||
<option value="m" minutes </option>
|
<option value="m">minutes</option>
|
||||||
<option value="h" heures </option>
|
<option value="h">heures</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input id="maxRTTHidden" type="hidden" name="--max-scan-delay">
|
<input id="maxRTTHidden" type="hidden" name="--max-scan-delay">
|
||||||
@ -680,17 +680,8 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
?>
|
?>
|
||||||
</datalist>
|
</datalist>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
<script>
|
<script>
|
||||||
toggleThemeButton.onclick = function(event) {
|
|
||||||
if (document.body.classList.contains('inverted')) {
|
|
||||||
$(".inverted").addClass("light").removeClass("inverted")
|
|
||||||
$("#toggleThemeButton i").addClass("moon").removeClass("sun")
|
|
||||||
} else {
|
|
||||||
$(".light").addClass("inverted").removeClass("light")
|
|
||||||
$("#toggleThemeButton i").addClass("sun").removeClass("moon")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".ui.accordion").accordion()
|
$(".ui.accordion").accordion()
|
||||||
|
|
||||||
$(".ui.clearable.dropdown").dropdown({
|
$(".ui.clearable.dropdown").dropdown({
|
||||||
|
15
script.js
Normal file
15
script.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
function toggleTheme() {
|
||||||
|
if (document.body.classList.contains('inverted')) {
|
||||||
|
$(".inverted").addClass("light").removeClass("inverted")
|
||||||
|
$("#toggleThemeButton i").addClass("moon").removeClass("sun")
|
||||||
|
localStorage.setItem("laScanTheme", "light")
|
||||||
|
} else {
|
||||||
|
$(".light").addClass("inverted").removeClass("light")
|
||||||
|
$("#toggleThemeButton i").addClass("sun").removeClass("moon")
|
||||||
|
localStorage.setItem("laScanTheme", "dark")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (localStorage.getItem("laScanTheme") === "light") {
|
||||||
|
toggleTheme()
|
||||||
|
}
|
@ -39,6 +39,7 @@
|
|||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$('.ui.tree.accordion').accordion()
|
$('.ui.tree.accordion').accordion()
|
||||||
$('.ui.dropdown').dropdown()
|
$('.ui.dropdown').dropdown()
|
||||||
@ -132,7 +133,7 @@ $('.ui.dropdown').dropdown()
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="os/osmatch/@name">
|
<xsl:if test="os/osmatch/@name">
|
||||||
<td>
|
<td>
|
||||||
<xsl:value-of select="os/osmatch/@name" />
|
<abbr title="Confiance : {os/osmatch/@accuracy}%"><xsl:value-of select="os/osmatch/@name" /></abbr>
|
||||||
</td>
|
</td>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="distance/@value">
|
<xsl:if test="distance/@value">
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small compact stuck striped table">
|
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small compact stuck striped table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: min-width">Etat</th>
|
<th style="width: min-width">État</th>
|
||||||
<th>Adresse IP</th>
|
<th>Adresse IP</th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Constructeur</th>
|
<th>Constructeur</th>
|
||||||
@ -68,6 +68,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var table = $('#scanResultsTable').DataTable({
|
var table = $('#scanResultsTable').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
|
@ -71,7 +71,7 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254" />
|
|||||||
<i class='sync icon'></i>
|
<i class='sync icon'></i>
|
||||||
</a>
|
</a>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre">
|
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre" onclick="toggleTheme()">
|
||||||
<i class="sun icon"></i>
|
<i class="sun icon"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -79,15 +79,6 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254" />
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
toggleThemeButton.onclick = function(event) {
|
|
||||||
if (document.body.classList.contains('inverted')) {
|
|
||||||
$(".inverted").addClass("light").removeClass("inverted")
|
|
||||||
$("#toggleThemeButton i").addClass("moon").removeClass("sun")
|
|
||||||
} else {
|
|
||||||
$(".light").addClass("inverted").removeClass("light")
|
|
||||||
$("#toggleThemeButton i").addClass("sun").removeClass("moon")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scanForm.onsubmit = function(event) {
|
scanForm.onsubmit = function(event) {
|
||||||
if (scanForm.checkValidity()) {
|
if (scanForm.checkValidity()) {
|
||||||
targetsInputDiv.classList.add('loading')
|
targetsInputDiv.classList.add('loading')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user