Skip to content

Commit

Permalink
Deploying to gh-pages from @ c51e1aa 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
kordwarshuis committed Jan 26, 2024
1 parent b7bb7bf commit 20a2af5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
11 changes: 6 additions & 5 deletions assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3686,7 +3686,7 @@ const iziToast = /* @__PURE__ */ getDefaultExportFromCjs(iziToastExports);
allKerificButtons.forEach((kerificButton) => {
const kerificButtonText = kerificButton.innerText;
const kerificButtonTextLowercase = kerificButton.innerText.toLowerCase();
let glossaryPopupHeaderContent = `<h2 class='animate__animated'>“${kerificButtonText}”</h2>`;
let glossaryPopupHeaderContent = `<h2 class='popup-definition animate__animated'>“${kerificButtonText}”</h2>`;
let glossaryPopupBodyContent = ``;
combinedGlossaries.forEach((combinedGlossariesEntry) => {
if (kerificButtonTextLowercase === combinedGlossariesEntry.termToLowerCase && !popUpLedger.includes(kerificButtonTextLowercase)) {
Expand All @@ -3699,8 +3699,9 @@ const iziToast = /* @__PURE__ */ getDefaultExportFromCjs(iziToastExports);
if (eachDefinitions2.organisation === glossaryEntryDefinitionsEntry.organisation) {
counter++;
glossaryPopupBodyContent += `
<h3>${counter}: ${eachDefinitions2.organisation}</h3>
<h3>${counter}: <span class="popup-organisation">${eachDefinitions2.organisation}</span></h3>
<small>Redirected to: “<strong>${combinedGlossariesEntry2.term}</strong>”:</small>
<button class="kerific-save">Save</button>
<div class="definition-block">${removeLinks(eachDefinitions2.definition)}</div>
<hr>
`;
Expand All @@ -3711,7 +3712,7 @@ const iziToast = /* @__PURE__ */ getDefaultExportFromCjs(iziToastExports);
} else {
counter++;
glossaryPopupBodyContent += `
<h3>${counter}: ${glossaryEntryDefinitionsEntry.organisation}</h3>
<h3>${counter}: <span class="popup-organisation">${glossaryEntryDefinitionsEntry.organisation}</span></h3>
<button class="kerific-save">Save</button>
<div class="definition-block">${removeLinks(glossaryEntryDefinitionsEntry.definition)}</div>
<hr>
Expand Down Expand Up @@ -3753,9 +3754,9 @@ const iziToast = /* @__PURE__ */ getDefaultExportFromCjs(iziToastExports);
chrome.runtime.sendMessage({
action: "addTerm",
entry: {
"term": el.closest(".card-body").previousElementSibling.querySelector(".animate__animated").innerText,
"term": el.closest(".card-body").previousElementSibling.querySelector(".popup-definition").innerText,
"definition": el.closest(".card-body").querySelector(".definition-block").innerHTML,
"organisation": el.closest(".card-body").querySelector("h3").innerText
"organisation": el.closest(".card-body").querySelector(".popup-organisation").innerText
}
}, function(response) {
console.log("Response:", response);
Expand Down
2 changes: 1 addition & 1 deletion collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>


<h1>Your collected definitions</h1>
<h1 class="mb-3">Your collected definitions</h1>
<div id="container-collection"></div>


Expand Down
9 changes: 7 additions & 2 deletions js/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ function loadCollections() {

domString += `
<div class="card mb-5">
<div class="card-body">
<div class="card-header">
<h2>${terms[i].term}</h2>
</div>
<div class="card-body">
<p class="card-text">
${terms[i].definition}
</p>
</div>
<div class="card-footer">
<p class="card-text">
This definition comes from: ${terms[i].organisation}
This definition comes from: ${terms[i].organisation}
</p>
</div>
</div>
`;
}
Expand Down

0 comments on commit 20a2af5

Please sign in to comment.