Initial commit

This commit is contained in:
Ray 2024-11-10 00:24:12 +00:00
commit 417da22c71
55 changed files with 60510 additions and 0 deletions

4085
bootstrap/5.3.3/css/bootstrap-grid.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4084
bootstrap/5.3.3/css/bootstrap-grid.rtl.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

597
bootstrap/5.3.3/css/bootstrap-reboot.css vendored Normal file
View File

@ -0,0 +1,597 @@
/*!
* Bootstrap Reboot v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root,
[data-bs-theme=light] {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-primary-text-emphasis: #052c65;
--bs-secondary-text-emphasis: #2b2f32;
--bs-success-text-emphasis: #0a3622;
--bs-info-text-emphasis: #055160;
--bs-warning-text-emphasis: #664d03;
--bs-danger-text-emphasis: #58151c;
--bs-light-text-emphasis: #495057;
--bs-dark-text-emphasis: #495057;
--bs-primary-bg-subtle: #cfe2ff;
--bs-secondary-bg-subtle: #e2e3e5;
--bs-success-bg-subtle: #d1e7dd;
--bs-info-bg-subtle: #cff4fc;
--bs-warning-bg-subtle: #fff3cd;
--bs-danger-bg-subtle: #f8d7da;
--bs-light-bg-subtle: #fcfcfd;
--bs-dark-bg-subtle: #ced4da;
--bs-primary-border-subtle: #9ec5fe;
--bs-secondary-border-subtle: #c4c8cb;
--bs-success-border-subtle: #a3cfbb;
--bs-info-border-subtle: #9eeaf9;
--bs-warning-border-subtle: #ffe69c;
--bs-danger-border-subtle: #f1aeb5;
--bs-light-border-subtle: #e9ecef;
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg: #fff;
--bs-body-bg-rgb: 255, 255, 255;
--bs-emphasis-color: #000;
--bs-emphasis-color-rgb: 0, 0, 0;
--bs-secondary-color: rgba(33, 37, 41, 0.75);
--bs-secondary-color-rgb: 33, 37, 41;
--bs-secondary-bg: #e9ecef;
--bs-secondary-bg-rgb: 233, 236, 239;
--bs-tertiary-color: rgba(33, 37, 41, 0.5);
--bs-tertiary-color-rgb: 33, 37, 41;
--bs-tertiary-bg: #f8f9fa;
--bs-tertiary-bg-rgb: 248, 249, 250;
--bs-heading-color: inherit;
--bs-link-color: #0d6efd;
--bs-link-color-rgb: 13, 110, 253;
--bs-link-decoration: underline;
--bs-link-hover-color: #0a58ca;
--bs-link-hover-color-rgb: 10, 88, 202;
--bs-code-color: #d63384;
--bs-highlight-color: #212529;
--bs-highlight-bg: #fff3cd;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-xxl: 2rem;
--bs-border-radius-2xl: var(--bs-border-radius-xxl);
--bs-border-radius-pill: 50rem;
--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
--bs-focus-ring-width: 0.25rem;
--bs-focus-ring-opacity: 0.25;
--bs-focus-ring-color: rgba(13, 110, 253, 0.25);
--bs-form-valid-color: #198754;
--bs-form-valid-border-color: #198754;
--bs-form-invalid-color: #dc3545;
--bs-form-invalid-border-color: #dc3545;
}
[data-bs-theme=dark] {
color-scheme: dark;
--bs-body-color: #dee2e6;
--bs-body-color-rgb: 222, 226, 230;
--bs-body-bg: #212529;
--bs-body-bg-rgb: 33, 37, 41;
--bs-emphasis-color: #fff;
--bs-emphasis-color-rgb: 255, 255, 255;
--bs-secondary-color: rgba(222, 226, 230, 0.75);
--bs-secondary-color-rgb: 222, 226, 230;
--bs-secondary-bg: #343a40;
--bs-secondary-bg-rgb: 52, 58, 64;
--bs-tertiary-color: rgba(222, 226, 230, 0.5);
--bs-tertiary-color-rgb: 222, 226, 230;
--bs-tertiary-bg: #2b3035;
--bs-tertiary-bg-rgb: 43, 48, 53;
--bs-primary-text-emphasis: #6ea8fe;
--bs-secondary-text-emphasis: #a7acb1;
--bs-success-text-emphasis: #75b798;
--bs-info-text-emphasis: #6edff6;
--bs-warning-text-emphasis: #ffda6a;
--bs-danger-text-emphasis: #ea868f;
--bs-light-text-emphasis: #f8f9fa;
--bs-dark-text-emphasis: #dee2e6;
--bs-primary-bg-subtle: #031633;
--bs-secondary-bg-subtle: #161719;
--bs-success-bg-subtle: #051b11;
--bs-info-bg-subtle: #032830;
--bs-warning-bg-subtle: #332701;
--bs-danger-bg-subtle: #2c0b0e;
--bs-light-bg-subtle: #343a40;
--bs-dark-bg-subtle: #1a1d20;
--bs-primary-border-subtle: #084298;
--bs-secondary-border-subtle: #41464b;
--bs-success-border-subtle: #0f5132;
--bs-info-border-subtle: #087990;
--bs-warning-border-subtle: #997404;
--bs-danger-border-subtle: #842029;
--bs-light-border-subtle: #495057;
--bs-dark-border-subtle: #343a40;
--bs-heading-color: inherit;
--bs-link-color: #6ea8fe;
--bs-link-hover-color: #8bb9fe;
--bs-link-color-rgb: 110, 168, 254;
--bs-link-hover-color-rgb: 139, 185, 254;
--bs-code-color: #e685b5;
--bs-highlight-color: #dee2e6;
--bs-highlight-bg: #664d03;
--bs-border-color: #495057;
--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
--bs-form-valid-color: #75b798;
--bs-form-valid-border-color: #75b798;
--bs-form-invalid-color: #ea868f;
--bs-form-invalid-border-color: #ea868f;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: var(--bs-border-width) solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
color: var(--bs-heading-color);
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
color: var(--bs-highlight-color);
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
text-decoration: underline;
}
a:hover {
--bs-link-color-rgb: var(--bs-link-hover-color-rgb);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: var(--bs-secondary-color);
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,594 @@
/*!
* Bootstrap Reboot v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root,
[data-bs-theme=light] {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-primary-text-emphasis: #052c65;
--bs-secondary-text-emphasis: #2b2f32;
--bs-success-text-emphasis: #0a3622;
--bs-info-text-emphasis: #055160;
--bs-warning-text-emphasis: #664d03;
--bs-danger-text-emphasis: #58151c;
--bs-light-text-emphasis: #495057;
--bs-dark-text-emphasis: #495057;
--bs-primary-bg-subtle: #cfe2ff;
--bs-secondary-bg-subtle: #e2e3e5;
--bs-success-bg-subtle: #d1e7dd;
--bs-info-bg-subtle: #cff4fc;
--bs-warning-bg-subtle: #fff3cd;
--bs-danger-bg-subtle: #f8d7da;
--bs-light-bg-subtle: #fcfcfd;
--bs-dark-bg-subtle: #ced4da;
--bs-primary-border-subtle: #9ec5fe;
--bs-secondary-border-subtle: #c4c8cb;
--bs-success-border-subtle: #a3cfbb;
--bs-info-border-subtle: #9eeaf9;
--bs-warning-border-subtle: #ffe69c;
--bs-danger-border-subtle: #f1aeb5;
--bs-light-border-subtle: #e9ecef;
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg: #fff;
--bs-body-bg-rgb: 255, 255, 255;
--bs-emphasis-color: #000;
--bs-emphasis-color-rgb: 0, 0, 0;
--bs-secondary-color: rgba(33, 37, 41, 0.75);
--bs-secondary-color-rgb: 33, 37, 41;
--bs-secondary-bg: #e9ecef;
--bs-secondary-bg-rgb: 233, 236, 239;
--bs-tertiary-color: rgba(33, 37, 41, 0.5);
--bs-tertiary-color-rgb: 33, 37, 41;
--bs-tertiary-bg: #f8f9fa;
--bs-tertiary-bg-rgb: 248, 249, 250;
--bs-heading-color: inherit;
--bs-link-color: #0d6efd;
--bs-link-color-rgb: 13, 110, 253;
--bs-link-decoration: underline;
--bs-link-hover-color: #0a58ca;
--bs-link-hover-color-rgb: 10, 88, 202;
--bs-code-color: #d63384;
--bs-highlight-color: #212529;
--bs-highlight-bg: #fff3cd;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-xxl: 2rem;
--bs-border-radius-2xl: var(--bs-border-radius-xxl);
--bs-border-radius-pill: 50rem;
--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
--bs-focus-ring-width: 0.25rem;
--bs-focus-ring-opacity: 0.25;
--bs-focus-ring-color: rgba(13, 110, 253, 0.25);
--bs-form-valid-color: #198754;
--bs-form-valid-border-color: #198754;
--bs-form-invalid-color: #dc3545;
--bs-form-invalid-border-color: #dc3545;
}
[data-bs-theme=dark] {
color-scheme: dark;
--bs-body-color: #dee2e6;
--bs-body-color-rgb: 222, 226, 230;
--bs-body-bg: #212529;
--bs-body-bg-rgb: 33, 37, 41;
--bs-emphasis-color: #fff;
--bs-emphasis-color-rgb: 255, 255, 255;
--bs-secondary-color: rgba(222, 226, 230, 0.75);
--bs-secondary-color-rgb: 222, 226, 230;
--bs-secondary-bg: #343a40;
--bs-secondary-bg-rgb: 52, 58, 64;
--bs-tertiary-color: rgba(222, 226, 230, 0.5);
--bs-tertiary-color-rgb: 222, 226, 230;
--bs-tertiary-bg: #2b3035;
--bs-tertiary-bg-rgb: 43, 48, 53;
--bs-primary-text-emphasis: #6ea8fe;
--bs-secondary-text-emphasis: #a7acb1;
--bs-success-text-emphasis: #75b798;
--bs-info-text-emphasis: #6edff6;
--bs-warning-text-emphasis: #ffda6a;
--bs-danger-text-emphasis: #ea868f;
--bs-light-text-emphasis: #f8f9fa;
--bs-dark-text-emphasis: #dee2e6;
--bs-primary-bg-subtle: #031633;
--bs-secondary-bg-subtle: #161719;
--bs-success-bg-subtle: #051b11;
--bs-info-bg-subtle: #032830;
--bs-warning-bg-subtle: #332701;
--bs-danger-bg-subtle: #2c0b0e;
--bs-light-bg-subtle: #343a40;
--bs-dark-bg-subtle: #1a1d20;
--bs-primary-border-subtle: #084298;
--bs-secondary-border-subtle: #41464b;
--bs-success-border-subtle: #0f5132;
--bs-info-border-subtle: #087990;
--bs-warning-border-subtle: #997404;
--bs-danger-border-subtle: #842029;
--bs-light-border-subtle: #495057;
--bs-dark-border-subtle: #343a40;
--bs-heading-color: inherit;
--bs-link-color: #6ea8fe;
--bs-link-hover-color: #8bb9fe;
--bs-link-color-rgb: 110, 168, 254;
--bs-link-hover-color-rgb: 139, 185, 254;
--bs-code-color: #e685b5;
--bs-highlight-color: #dee2e6;
--bs-highlight-bg: #664d03;
--bs-border-color: #495057;
--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
--bs-form-valid-color: #75b798;
--bs-form-valid-border-color: #75b798;
--bs-form-invalid-color: #ea868f;
--bs-form-invalid-border-color: #ea868f;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: var(--bs-border-width) solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
color: var(--bs-heading-color);
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
color: var(--bs-highlight-color);
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
text-decoration: underline;
}
a:hover {
--bs-link-color-rgb: var(--bs-link-hover-color-rgb);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: var(--bs-secondary-color);
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12057
bootstrap/5.3.3/css/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

6
bootstrap/5.3.3/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12030
bootstrap/5.3.3/css/bootstrap.rtl.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6314
bootstrap/5.3.3/js/bootstrap.bundle.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4447
bootstrap/5.3.3/js/bootstrap.esm.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4494
bootstrap/5.3.3/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7
bootstrap/5.3.3/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

55
content.js Normal file
View File

@ -0,0 +1,55 @@
class MessagingService {
async GetNodes(sender, callback) {
const a = this;
const nodes = await document.body.getElementsByTagName("a");
let result = [];
for (let i=0; i<nodes.length; i++) {
result.push({
innerText: nodes[i].innerText ?? "",
innerHTML: nodes[i].innerHTML ?? "",
href: (nodes[i].getAttribute("href") ?? "").trim(),
title: (nodes[i].getAttribute("title") ?? "").trim(),
target: nodes[i].getAttribute("target") ?? "",
rel: nodes[i].getAttribute("rel") ?? "",
type: nodes[i].getAttribute("type") ?? "",
occurrence: 1
});
}
// for (let i=0; i<result.length; i++) {
// result[i].occurrence = result.filter(item => JSON.stringify(item) === JSON.stringify(result[i])).length;
// }
await callback(result);
}
async GetLocation(sender, callback) {
callback(document.location.href);
}
}
const messageService = new MessagingService();
chrome.runtime.onMessage.addListener(async function(request, sender, callback) {
if (typeof(messageService[request.event]) == "undefined") {
return;
}
await messageService[request.event](sender, callback);
});
// var optHideWatchedVideos = new Promise(function(resolve) {
// chrome.storage.local.get(['switch1'], function(result) {
// resolve(result.switch1);
// });
// });

BIN
icon128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
icon16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
icon32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
icon48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
icon64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

File diff suppressed because one or more lines are too long

37
manifest.json Normal file
View File

@ -0,0 +1,37 @@
{
"name": "Peji Inspektor",
"description": "",
"short_name": "peji inspektor",
"homepage_url": "https://www.hiimray.co.uk",
"icons": {
"128": "icon128.png",
"16": "icon16.png",
"32": "icon32.png",
"48": "icon48.png",
"64": "icon64.png"
},
"version": "0.1.0.234",
"manifest_version": 3,
"action": {
"default_icon": {
"16": "icon16.png",
"32": "icon32.png",
"48": "icon48.png",
"64": "icon64.png"
},
"default_title": "Peji Inspektor",
"default_popup": "popup.html"
},
"content_scripts": [{
"js": [
"literyz-js/extensions.dist.js",
"content.js"
],
"matches": [ "http://*/*", "https://*/*" ],
"run_at": "document_end"
}],
"content_security_policy": {
"extension_page":"script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
},
"permissions": [ "storage", "tabs" ]
}

18
popup.css Normal file
View File

@ -0,0 +1,18 @@
body {
/* font-family: Arial, Helvetica, sans-serif; */
font-size: 13px;
min-height: 600px;
margin: 0px;
overflow-y: scroll;
padding: 20px;
width: 600px;
}
input[type="text"].display, input[type="text"].display:active, input[type="text"].display:focus, input[type="text"].display:hover {
background-color: transparent;
border-style: none;
font-size: 0.9em;
margin: 0px;
padding: 0px;
width: 100%;
}

162
popup.html Normal file
View File

@ -0,0 +1,162 @@
<!doctype html>
<html>
<head>
<script src="bootstrap/5.3.3/js/bootstrap.min.js"></script>
<script src="literyz-js/extensions.dist.js"></script>
<script src="vue-js/dist/core.dist.js"></script>
<script src="popup.js"></script>
<link rel="stylesheet" href="bootstrap/5.3.3/css/bootstrap.min.css">
<link rel="stylesheet" href="popup.css">
<title>Peji Inspektor</title>
</head>
<body>
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button>
<button class="nav-link" id="nav-hyperlinks-tab" data-bs-toggle="tab" data-bs-target="#nav-hyperlinks" type="button" role="tab" aria-controls="nav-hyperlinks" aria-selected="false">Hyperlinks</button>
<button class="nav-link" id="nav-images-tab" data-bs-toggle="tab" data-bs-target="#nav-images" type="button" role="tab" aria-controls="nav-images" aria-selected="false">Images</button>
<button class="nav-link" id="nav-disabled-tab" data-bs-toggle="tab" data-bs-target="#nav-disabled" type="button" role="tab" aria-controls="nav-disabled" aria-selected="false" disabled>Disabled</button>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab" tabindex="0">...</div>
<div class="tab-pane py-3 fade" id="nav-hyperlinks" role="tabpanel" aria-labelledby="nav-hyperlinks-tab" tabindex="0">
<div class="container-fluid">
<div class="row pb-2" role="options"></div>
<div class="row pb-3 mb-3 border-bottom">
<div class="col">
<button type="button" class="btn btn-primary btn-sm">Load Results</button>
<button type="button" class="btn btn-outline-secondary btn-sm">Load CSV</button>
</div>
</div>
<div class="row pb-1">
<div class="col">
<span class="fw-bold" role="table-heading">Results</span>
</div>
</div>
<div class="row">
<div class="col">
<table class="table table-bordered table-hover table-sm table-striped">
<thead></thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="nav-images" role="tabpanel" aria-labelledby="nav-images-tab" tabindex="0">...</div>
<div class="tab-pane fade" id="nav-disabled" role="tabpanel" aria-labelledby="nav-disabled-tab" tabindex="0">...</div>
</div>
<!-- <p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p> -->
<!-- <div id="body"> -->
<!-- <p>
<button id="button1">Hyperlinks</button>
<button id="button2">Images</button>
</p>
<textarea id="memoBox1" style="width: 100%" rows="16"></textarea>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="table">
<div class="row">
<div class="column-1">Hide Watched Videos</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch1" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
<div class="row">
<div class="column-1">Hide Resumeable Videos</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch2" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
<div class="row">
<div class="column-1">Hide Removed Videos</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch3" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
<div class="row">
<div class="column-1">Hide On Middle-Click</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch4" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
<div class="row">
<hr />
</div>
<div class="row">
<div class="column-1">Bypass Shorts</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch5" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
<div class="row">
<div class="column-1">Hide Shorts Section</div>
<div class="column-2">
<label class="switch switch-primary">
<input id="switch6" type="checkbox" />
<span class="switch-slider"></span>
</label>
</div>
</div>
</div> -->
<!-- </div> -->
<!-- <script type="module" src="popup1.js"></script> -->
</body>
</html>

644
popup.js Normal file
View File

@ -0,0 +1,644 @@
class PopupService {
async SendMessage(eventName, callback) {
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, { event: eventName }, callback);
});
}
async GetHyperlinks() {
const a = this;
const baseUrl = await a.GetLocation();
return new Promise(function(resolve) {
a.SendMessage("GetNodes", async function(payload) {
// let result = {
// items: payload.copy(),
// totalCount: payload.length,
// distinctCount: 0
// };
// result.items = result.items.orderBy("innerText");
// result.items = result.items.distinct();
// result.distinctCount = result.items.length;
// Populate occurrence counter
// for (let i=0; i<result.items.length; i++) {
// result.items[i].occurrence = payload.filter(item => JSON.stringify(item) === JSON.stringify(result.items[i])).length;
// }
// resolve(result);
// console.log(payload);
resolve(payload.copy());
});
});
}
async GetLocation() {
const a = this;
return new Promise(function(resolve) {
a.SendMessage("GetLocation", function(payload) {
resolve(payload);
});
});
}
}
class ContentService {
GenerateCheckBox(num, label, checked) {
let html = "";
html += "<div class=\"form-check form-switch\">";
html += "<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"checkbox" + num + "\" " + (checked ? "checked" : "") + ">";
html += "<label class=\"form-check-label\" for=\"checkbox" + num + "\">" + label + "</label>";
html += "</div>";
return html;
}
GenerateCols(...args) {
let html = "";
for (let i=0; i<args.length; i++) {
html += "<div class=\"col\">" + args[i] + "</div>";
}
return html;
}
GenerateRow(...args) {
const a = this;
if (args.length === 1) {
if (Object.getDataType(args[0]) == "array") {
args = args[0];
}
}
let result = "";
for (let i=0; i<args.length; i++) {
result = result + a.GenerateRowCell(args[i]);
}
return "<tr>" + result + "</tr>";
}
GenerateRowCell(value) {
return "<td class=\"\"><input type=\"text\" class=\"display\" readonly=\"readonly\" value=\"" + value + "\" /></td>";
}
}
class AContentService extends ContentService {
ContainerPanel = null;
Panel1 = null;
Button1 = null;
Button2 = null;
Label1 = null;
Table1 = null;
#PopupService = null;
#TableLabel = "Results";
constructor(popupService) {
super();
this.#PopupService = popupService;
}
InitialiseComponents(){
const a = this;
a.ContainerPanel = document.getElementById("nav-hyperlinks");
a.Panel1 = a.ContainerPanel.querySelectorAll("div[role='options']")[0];
a.Button1 = a.ContainerPanel.querySelectorAll("button")[0];
a.Button2 = a.ContainerPanel.querySelectorAll("button")[1];
a.Label1 = a.ContainerPanel.querySelectorAll("span[role='table-heading']")[0];
a.Table1 = a.ContainerPanel.querySelectorAll("table")[0];
a.Clear();
let col1 = "";
col1 += a.GenerateCheckBox(1, "Show Anchor as HTML", false);
col1 += a.GenerateCheckBox(3, "Sort By Anchor Text", true);
col1 += a.GenerateCheckBox(2, "Trim Anchor Text", true);
col1 += a.GenerateCheckBox(4, "Resolve Relative URL", false);
col1 += a.GenerateCheckBox(12, "Hide External Links", true);
let col2 = "";
col2 += a.GenerateCheckBox(5, "Hide Duplicates", true);
col2 += a.GenerateCheckBox(14, "Hide Blank Anchors", true);
col2 += a.GenerateCheckBox(15, "Hide Blank Links", true);
col2 += a.GenerateCheckBox(11, "Hide Fragments", true);
col2 += a.GenerateCheckBox(13, "Hide Mailto/Tel", true);
let col3 = "";
col3 += a.GenerateCheckBox(6, "Show Title", true);
col3 += a.GenerateCheckBox(7, "Show Target", false);
col3 += a.GenerateCheckBox(8, "Show Rel", false);
col3 += a.GenerateCheckBox(9, "Show Type", false);
col3 += a.GenerateCheckBox(10, "Show Occurrence", false);
let html = a.GenerateCols(col1, col2, col3);
a.#writeOptionsPanel(html);
a.Button1.addEventListener('click', async function (e) {
a.Button1.disabled = true;
await a.Search();
a.Button1.disabled = false;
});
}
Clear() {
const a = this;
a.#writeOptionsPanel("");
a.#clearTable();
}
async Search() {
const a = this;
const thead = a.Table1.querySelectorAll("thead")[0];
const tbody = a.Table1.querySelectorAll("tbody")[0];
a.#clearTable();
// Write thead
thead.innerHTML = "<tr>" + a.#generateTHeader() + "</tr>";
const result = await a.#PopupService.GetHyperlinks();
const totalCount = result.length;
a.Label1.innerText = a.#TableLabel + " (" + totalCount + ")";
const newResults = await a.#filterSearch(result.copy());
if (newResults.length != totalCount) {
a.Label1.innerText = a.#TableLabel + " (" + newResults.length + "/" + totalCount + ")";
}
for (let i=0; i<newResults.length; i++) {
const item = newResults[i];
let row = [ item.text, item.href ];
if (a.#getCheckBox(6)) {
row.push(item.title);
}
if (a.#getCheckBox(7)) {
row.push(item.target);
}
if (a.#getCheckBox(8)) {
row.push(item.rel);
}
if (a.#getCheckBox(9)) {
row.push(item.type);
}
if (a.#getCheckBox(10)) {
row.push(item.occurrence);
}
tbody.innerHTML += a.GenerateRow(row);
}
}
#clearTable() {
const a = this;
a.Label1.innerText = a.#TableLabel;
const thead = a.Table1.querySelectorAll("thead")[0];
const tbody = a.Table1.querySelectorAll("tbody")[0];
thead.innerHTML = "";
tbody.innerHTML = "";
}
async #filterSearch(items) {
const a = this;
const currentUrl = await popupService.GetLocation();
const currentHostname = (new URL(currentUrl)).hostname;
let result = [];
for (let i=0; i<items.length; i++) {
const item = items[i];
// Hide fragments
if (a.#getCheckBox(11)) {
if (item.href.startsWith("#")) {
continue;
}
}
// Hide Blank Links
if (a.#getCheckBox(15)) {
if (String.isNullOrWhitespace(item.href)) {
continue;
}
}
// Hide mailto/tel
if (a.#getCheckBox(13)) {
if (item.href.toLowerCase().startsWith("telno:") || item.href.toLowerCase().startsWith("mailto:")) {
continue;
}
}
const absoluteUrl = new URL(item.href, currentUrl);
// Hide external links
if (a.#getCheckBox(12)) {
if (currentHostname != absoluteUrl.hostname) {
continue;
}
}
// Show anchor as html
let text = (a.#getCheckBox(1) ? item.innerHTML : item.innerText);
// Hide Blank Anchors
if (a.#getCheckBox(14)) {
if (String.isNullOrWhitespace(text)) {
continue;
}
}
// Resolve relative url
const href = (a.#getCheckBox(4) ? absoluteUrl.href : item.href);
// Trim anchor text
if (a.#getCheckBox(2)) {
text = text.trim();
}
result.push({
text: text,
href: href,
title: (a.#getCheckBox(6) ? item.title : ""),
target: (a.#getCheckBox(7) ? item.target : ""),
rel: (a.#getCheckBox(8) ? item.rel : ""),
type: (a.#getCheckBox(9) ? item.type : ""),
occurrence: ""
});
}
// Show occurrence
if (a.#getCheckBox(10)) {
// Calc occurrences, store in cache
let occurrenceCache = [];
for (let i=0; i<result.length; i++) {
const occurrence = result.filter(item => JSON.stringify(item) === JSON.stringify(result[i])).length;
occurrenceCache.push(occurrence);
}
// Update result with occurrence
for (let i=0; i<result.length; i++) {
result[i].occurrence = occurrenceCache[i];
}
}
// Hide duplicates
if (a.#getCheckBox(5)) {
result = result.distinct();
}
// Sort by anchor text
if (a.#getCheckBox(3)) {
result = result.orderBy("text");
}
return result;
}
#generateTHeader() {
const a = this;
const columns = [
{ id: 6, name: "Title" },
{ id: 7, name: "Target" },
{ id: 8, name: "Rel" },
{ id: 9, name: "Type" },
{ id: 10, name: "Occurrence" }
];
let html = "";
html += "<th>Anchor Text</th>";
html += "<th>Address</th>";
for (let i=0; i<columns.length; i++) {
if (a.#getCheckBox(columns[i].id)) {
html += "<th>" + columns[i].name + "</th>";
}
}
return html;
}
#getCheckBox(num) {
const a = this;
if (a.Panel1 == null) {
return false;
}
const result = a.Panel1.querySelectorAll("input[id='checkbox" + num + "']");
if (result.length <= 0) {
return false;
}
return result[0].checked;
}
#writeOptionsPanel(htmlContent) {
const a = this;
if (a.Panel1 == null) {
return;
}
a.Panel1.innerHTML = htmlContent;
}
}
const popupService = new PopupService();
const aContentService = new AContentService(popupService);
document.addEventListener("DOMContentLoaded", async function(event) {
aContentService.InitialiseComponents();
// aContentService.Button1.addEventListener('click', async function (e) {
// const body = aContentService.Table1.querySelectorAll("tbody")[0];
// body.innerHTML = "";
// const result = await popupService.GetHyperlinks();
// for (let i=0; i<result.length; i++) {
// const item = result[i];
// // const absoluteUrl = new URL(item.href, url);
// // memoBox1.innerText = absoluteUrl.hash;
// // console.log(absoluteUrl);
// body.innerHTML += aContentService.GenerateRow(item.innerHTML, item.href, item.title, item.target);
// }
// });
// PageAssetsCRX.HomeApp.mount("#App1");
// const panel2 = document.getElementById("nav-hyperlinks");
// const optionsPanel = panel2.querySelectorAll("div[role='options']")[0];
// optionsPanel.innerHTML = "";
// let html = "";
// html += contentService.GenerateCheckBox(1, "Show Anchor as HTML", false);
// html += contentService.GenerateCheckBox(2, "Trim Anchor Text", true);
// html += contentService.GenerateCheckBox(3, "Sort By Anchor Text", true);
// html += contentService.GenerateCheckBox(4, "Resolve Relative URL", true);
// html += contentService.GenerateCheckBox(5, "Hide Duplicates", true);
// html += contentService.GenerateCheckBox(6, "Show Title", true);
// html += contentService.GenerateCheckBox(7, "Show Target", true);
// html += contentService.GenerateCheckBox(8, "Show Rel", true);
// html += contentService.GenerateCheckBox(9, "Show Type", true);
// html += contentService.GenerateCheckBox(10, "Show Occurrence", true);
// optionsPanel.innerHTML = html;
// const label1 = document.getElementById("label1");
// const button1 = document.getElementById("button1");
// const checkbox1 = document.getElementById("checkbox1");
// const table1 = document.getElementById("table1");
// const memoBox1 = document.getElementById("memoBox1");
// const messageService = new MessageService();
// memoBox1.focus();
// button1.addEventListener('click', async function (e) {
// const body = table1.getElementsByTagName("tbody")[0];
// body.innerHTML = "";
// const result = await popupService.GetHyperlinks();
// for (let i=0; i<result.items.length; i++) {
// const item = result.items[i];
// // const absoluteUrl = new URL(item.href, url);
// // memoBox1.innerText = absoluteUrl.hash;
// // console.log(absoluteUrl);
// body.innerHTML += popupService.GenerateRow(item.innerHTML, item.href, item.title, item.target);
// }
// });
// memoBox1.innerText = await popupService.GetLocation();
// const body = table1.getElementsByTagName("tbody")[0];
// body.innerHTML = "";
// const result = await popupService.GetHyperlinks();
// for (let i=0; i<result.items.length; i++) {
// const item = result.items[i];
// // const absoluteUrl = new URL(item.href, url);
// // memoBox1.innerText = absoluteUrl.hash;
// // console.log(absoluteUrl);
// body.innerHTML += popupService.GenerateRow(item.text, item.href, item.title, item.target);
// }
// for (let i=0; i<result.items.length; i++) {
// const item = result.items[i];
// body.innerHTML += popupService.GenerateRow(item.text, item.href, item.title, item.occurrence);
// }
/*
popupService.SendMessage("GetNodes", async function(payload) {
const body = table1.getElementsByTagName("tbody")[0];
body.innerHTML = "";
let result = payload;
const totalCount = result.length;
result = result.distinct();
result = result.orderBy("text");
const distinctCount = result.length;
if (totalCount <= 0) {
label1.innerHTML = "Hyperlinks (0)";
} else if (totalCount == distinctCount) {
label1.innerHTML = "Hyperlinks (" + totalCount + ")";
} else {
label1.innerHTML = "Hyperlinks (" + distinctCount + "/" + totalCount + ")";
}
// memoBox1.innerText = JSON.stringify(e);
for( let i=0; i<result.length; i++) {
body.innerHTML += popupService.GenerateRow(result[i].text, result[i].href, result[i].title);
}
});
*/
/*
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, { event: "GetNodes" }, async function(payload) {
const body = table1.getElementsByTagName("tbody")[0];
body.innerHTML = "";
let result = payload;
const totalCount = result.length;
result = result.distinct();
result = result.orderBy("text");
const distinctCount = result.length;
if (totalCount <= 0) {
label1.innerHTML = "Hyperlinks (0)";
} else if (totalCount == distinctCount) {
label1.innerHTML = "Hyperlinks (" + totalCount + ")";
} else {
label1.innerHTML = "Hyperlinks (" + distinctCount + "/" + totalCount + ")";
}
// memoBox1.innerText = JSON.stringify(e);
for( let i=0; i<result.length; i++) {
body.innerHTML += popupService.GenerateRow(result[i].text, result[i].href, result[i].title);
}
});
// chrome.tabs.sendMessage(tabs[0].id, { data: "hello" }, response => {
// Print response on popup.html
// var msg = document.createElement("h3");
// msg.innerHTML = "H1:" + response;
// document.getElementById("container”).appendChild(msg);
// memoBox1.innerHTML = response;
// alert("!");
// });
});
*/
// document.getElementsByTagName("a").array.forEach(e => {
// memoBox1.innerHTML += e.href + "\n";
// });
// var switch1 = document.getElementById("switch1");
// var switch2 = document.getElementById("switch2");
// var switch3 = document.getElementById("switch3");
// var switch4 = document.getElementById("switch4");
// var switch5 = document.getElementById("switch5");
// var switch6 = document.getElementById("switch6");
// // read local storage
// chrome.storage.local.get(['switch1'], function(result) {
// switch1.checked = result.switch1;
// });
// chrome.storage.local.get(['switch2'], function(result) {
// switch2.checked = result.switch2;
// });
// chrome.storage.local.get(['switch3'], function(result) {
// switch3.checked = result.switch3;
// });
// chrome.storage.local.get(['switch4'], function(result) {
// switch4.checked = result.switch4;
// });
// chrome.storage.local.get(['switch5'], function(result) {
// switch5.checked = result.switch5;
// });
// chrome.storage.local.get(['switch6'], function(result) {
// switch6.checked = result.switch6;
// });
// // set values
// switch1.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch1: e.target.checked}, function() {
// // do nothing
// });
// });
// switch2.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch2: e.target.checked}, function() {
// // do nothing
// });
// });
// switch3.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch3: e.target.checked}, function() {
// // do nothing
// });
// });
// switch4.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch4: e.target.checked}, function() {
// // do nothing
// });
// });
// switch5.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch5: e.target.checked}, function() {
// // do nothing
// });
// });
// switch6.addEventListener('change', function (e) {
// chrome.storage.local.set({ switch6: e.target.checked}, function() {
// // do nothing
// });
// });
});