-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c5dcbe
commit 47b1b18
Showing
10 changed files
with
178 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
let toggle = false; | ||
|
||
function toCropList(e) { | ||
if ((e.ctrlKey && toggle)){ | ||
e.preventDefault(); | ||
window.location.href = e.target.href; | ||
return; | ||
} | ||
if ((toggle && !e.ctrlKey) || (e.ctrlKey && !toggle)) { | ||
e.preventDefault(); | ||
$(e.target).href="" | ||
const text = $(e.target) | ||
.text() | ||
.replace(/\n {20}Parent \d:/,"") | ||
.replace(/\n\s/,"") | ||
.replace(/\n\s/,"") | ||
.trim(); | ||
window.location.href = window.location.href.replace(/crop=(?:.*[^&])/,`crop=${text}`); | ||
} | ||
} | ||
|
||
function toggleMode() { | ||
toggle = !toggle; | ||
const element = document.getElementById("toggle"); | ||
const tooltips = document.getElementsByClassName("wrapper-box-left color-crops-wrapper color-crops-wrapper-border") | ||
if (toggle) { | ||
element.textContent = "Go to crop mode. Click/Tap here to toggle!" | ||
for (const div of tooltips){ | ||
div.setAttribute("data-original-title","Go to crop") | ||
} | ||
} | ||
else { | ||
element.textContent = "Ignore this crop mode. Click/Tap here to toggle!" | ||
for (const div of tooltips){ | ||
div.setAttribute("data-original-title","Ignore this crop") | ||
} | ||
} | ||
} | ||
|
||
$(document).keydown( | ||
function(ev) { | ||
if (ev.ctrlKey) { | ||
const tooltips = document.body.getElementsByClassName("tooltip-inner"); | ||
for (const e of tooltips) { | ||
if (!toggle) | ||
e.textContent = "Go to crop"; | ||
else | ||
e.textContent = "Ignore this crop"; | ||
} | ||
} | ||
} | ||
) | ||
$(document).keyup( | ||
function(ev) { | ||
if (!ev.ctrlKey) { | ||
const tooltips = document.body.getElementsByClassName("tooltip-inner"); | ||
for (const e of tooltips) { | ||
if (!toggle) | ||
e.textContent = "Ignore this crop"; | ||
else | ||
e.textContent = "Go to crop"; | ||
} | ||
} | ||
} | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification | ||
// for details on configuring this project to bundle and minify static web assets. | ||
|
||
// Write your Javascript code. | ||
|