Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
AlterTobi committed Jun 11, 2024
2 parents e626ced + c9aaa64 commit 3636a86
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 33 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ updates:
# Add assignees
assignees:
- "AlterTobi"
commit-message:
prefix: "github-actions"
include: "scope"

# Maintain dependencies for npm
- package-ecosystem: "npm"
Expand All @@ -23,6 +26,14 @@ updates:
target-branch: dev
assignees:
- "AlterTobi"
groups:
development-dependencies:
dependency-type: "development"
commit-message:
prefix: "npm"
prefix-development: "npm dev"
include: "scope"


# - package-ecosystem: "" # See documentation for possible values
# directory: "/" # Location of package manifests
Expand Down
75 changes: 67 additions & 8 deletions no_support/wfes-reviewDebug.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @name review Debug
// @version 1.1.5
// @version 1.1.7
// @description show some debugging info
// @author AlterTobi

Expand Down Expand Up @@ -28,11 +28,65 @@
.wfes-red { color: red; }
`;

// @TODO bring back title
// const skipNamesCommon = ["description", "title"];
const skipNamesCommon = ["description"];
const skipNamesCommon = ["description", "title"];

const matrix = [
[85, +6, +7, +6, +6, 81, +6, +0, +3, 85, +5, 84, -1, +8, +6, +0, -1, +3, +7, 86, +2, +8, +4, 81, +7, +7, +5, 82, +4, +0, 82, 85, 75, -1, +7, 7],
[84, +7, +6, +7, +7, 80, +7, +1, +2, 84, +4, 85, -1, +9, +7, +1, -1, +2, +6, 87, +3, +9, +5, 80, +6, +6, +4, 83, +5, +1, 83, 84, -1, +7, +6, 6],
[87, +4, +5, +4, +4, 83, +4, +2, +1, 87, +7, 86, -1, 10, +4, +2, -1, +1, +5, 84, +0, 10, +6, 83, +5, +5, +7, 80, +6, +2, 80, 87, -1, -1, +5, 5],
[86, +5, +4, +5, +5, 82, +5, +3, +0, 86, +6, 87, +3, 11, +5, +3, -1, +0, +4, 85, +1, 11, +7, 82, +4, +4, +6, 81, +7, +3, 81, 86, -1, -1, +4, 4],
[81, +2, +3, +2, +2, 85, +2, +4, +7, 81, +1, 80, +4, 12, +2, +4, -1, +7, +3, 82, +6, 12, +0, 85, +3, +3, +1, 86, +0, +4, 86, 81, -1, -1, +3, 3],
[80, +3, +2, +3, +3, 84, +3, +5, +6, 80, +0, 81, -1, 13, +3, +5, -1, +6, +2, 83, +7, 13, +1, 84, +2, +2, +0, 87, +1, +5, 87, 80, -1, -1, +2, 2],
[83, +0, +1, +0, +0, 87, +0, +6, +5, 83, +3, 82, -1, 14, +0, +6, -1, +5, +1, 80, +4, 14, +2, 87, +1, +1, +3, 84, +2, +6, 84, 83, -1, -1, +1, 1],
[82, +1, +0, +1, +1, 86, +1, +7, +4, 82, +2, 83, -1, 15, +1, +7, -1, +4, +0, 81, +5, 15, +3, 86, +0, +0, +2, 85, +3, +7, 85, 82, -1, -1, +0, 0],
[93, 14, 15, 14, 14, 89, 14, +8, 11, 93, 13, 92, -1, +0, 14, +8, +0, 11, 15, 94, 10, +0, 12, 89, 15, 15, 13, 90, 12, +8, 90, 93, -1, -1, 15, -1],
[92, 15, 14, 15, 15, 88, 15, +9, 10, 92, 12, 93, -1, +1, 15, +9, +1, 10, 14, 95, 11, +1, 13, 88, 14, 14, 12, 91, 13, +9, 91, 92, -1, -1, 14, -1],
[ 4, 87, 86, 87, 87, +0, 87, 81, 82, +4, 84, +5, -1, 89, 87, 81, 89, 82, 86, +7, 83, 89, 85, +0, 86, 86, 84, +3, 85, 81, +3, +4, -1, -1, 86, -1],
[ 7, 84, 85, 84, 84, +3, 84, 82, 81, +7, 87, +6, -1, 90, 84, 82, 90, 81, 85, +4, 80, 90, 86, +3, 85, 85, 87, +0, 86, 82, +0, +7, -1, -1, 85, -1],
[ 6, 85, 84, 85, 85, +2, 85, 83, 80, +6, 86, +7, -1, 91, 85, 83, -1, 80, 84, +5, 81, 91, 87, +2, 84, 84, 86, +1, 87, 83, +1, +6, -1, -1, 84, -1],
[ 1, 82, 83, 82, 82, +5, 82, 84, 87, +1, 81, +0, -1, 92, 82, 84, -1, 87, 83, +2, 86, 92, 80, +5, 83, 83, 81, +6, 80, 84, +6, +1, -1, -1, 83, -1],
[ 0, 83, 82, 83, 83, +4, 83, 85, 86, +0, 80, +1, -1, 93, 83, 85, -1, 86, 82, +3, 87, 93, 81, +4, 82, 82, 80, +7, 81, 85, +7, +0, -1, -1, 82, -1],
[ 3, 80, 81, 80, 80, +7, 80, 86, 85, +3, 83, +2, -1, 94, 80, 86, -1, 85, 81, +0, 84, 94, 82, +7, 81, 81, 83, +4, 82, 86, +4, +3, -1, -1, 81, -1]
];

// Funktion zur Ermittlung der GUID aus der gehashten ID
function getGUIDFromID(id, matrix) {
const decodedID = atob(id);
let guid = "";

if ((decodedID.length > 36) || (decodedID.length < 32)) {
console.warn("decoded data contains no guid", id);
return id;
}

for (let j = 0; j < decodedID.length; j++) {
const target = decodedID.charCodeAt(j);
let found = false;

if (32 === j) {
guid += ".";
continue;
}
if (j > 35) {
guid += "x";
continue;
}

for (let i = 0; i < matrix.length; i++) {
if (matrix[i][j] === target) {
guid += i.toString(16); // Hexadezimalwert zur GUID hinzufügen
found = true;
break;
}
}

if (!found) {
guid += "?";
}
}
return guid;
}

let overlay = null;

function showDebugBox(candidate, lskips) {
const skipNames = [...new Set(skipNamesCommon.concat(lskips))];
Expand All @@ -41,7 +95,7 @@
const skipped = [];

window.wfes.f.addCSS(myCssId, myStyle);

let overlay = document.getElementById(myID);
if (!overlay) {
overlay = document.createElement("div");
overlay.setAttribute("class", "wfes-debug");
Expand Down Expand Up @@ -95,9 +149,9 @@

function removeInfobox() {
// remove the overlay
if (overlay && document.getElementById(myID)) {
const overlay = document.getElementById(myID);
if (overlay ) {
overlay.remove();
overlay = null;
}
}

Expand Down Expand Up @@ -126,6 +180,11 @@
"upgraded", "city", "state", "appealNotes", "canHold", "canReleaseHold",
"nextUpgrade", "order", "day"];
const candidate = window.wfes.g.nominationDetail();
const poiId = wfes.g.nominationsList().find(obj => obj.id === candidate.id).poiData.id;
if (poiId) {
candidate.poiId = getGUIDFromID( poiId, matrix);
}
candidate.id = getGUIDFromID( candidate.id, matrix);
showDebugBox(candidate, lskips);
}

Expand Down
52 changes: 30 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "WFES",
"version": "1.0.0",
"version": "1.0.1",
"devDependencies": {
"@eslint/js": "^9.3.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@stylistic/eslint-plugin-js": "^2.1.0",
"eslint": "^9.3.0",
"eslint": "^9.4.0",
"globals": "^15.3.0"
}
}

0 comments on commit 3636a86

Please sign in to comment.