From d9cdea797fe26cc02d213b5fb040be8b38958be6 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Sat, 31 Dec 2022 11:01:50 +0300 Subject: Switched back to pug --- src/pages/options/index.pug | 11 + src/pages/options/widgets/about.ejs | 37 - src/pages/options/widgets/about.pug | 24 + src/pages/options/widgets/general.ejs | 70 -- src/pages/options/widgets/general.pug | 57 + src/pages/options/widgets/services.ejs | 76 -- src/pages/options/widgets/services.js | 18 - src/pages/options/widgets/services.pug | 52 + src/pages/popup/index.html | 1893 ++++++++++++++++++++++++++++++++ src/pages/popup/popup.ejs | 47 - src/pages/popup/popup.pug | 39 + src/pages/widgets/head.ejs | 8 - src/pages/widgets/head.pug | 7 + src/pages/widgets/links.ejs | 23 - src/pages/widgets/links.pug | 16 + src/pages/widgets/switches.ejs | 11 - src/pages/widgets/switches.pug | 6 + 17 files changed, 2105 insertions(+), 290 deletions(-) create mode 100644 src/pages/options/index.pug delete mode 100644 src/pages/options/widgets/about.ejs create mode 100644 src/pages/options/widgets/about.pug delete mode 100644 src/pages/options/widgets/general.ejs create mode 100644 src/pages/options/widgets/general.pug delete mode 100644 src/pages/options/widgets/services.ejs create mode 100644 src/pages/options/widgets/services.pug create mode 100644 src/pages/popup/index.html delete mode 100644 src/pages/popup/popup.ejs create mode 100644 src/pages/popup/popup.pug delete mode 100644 src/pages/widgets/head.ejs create mode 100644 src/pages/widgets/head.pug delete mode 100644 src/pages/widgets/links.ejs create mode 100644 src/pages/widgets/links.pug delete mode 100644 src/pages/widgets/switches.ejs create mode 100644 src/pages/widgets/switches.pug (limited to 'src/pages') diff --git a/src/pages/options/index.pug b/src/pages/options/index.pug new file mode 100644 index 00000000..12b2d2f3 --- /dev/null +++ b/src/pages/options/index.pug @@ -0,0 +1,11 @@ +doctype html +html(id="elementToShowWithJavaScript" lang="en") + include /src/pages/widgets/head + body(class="option" dir="auto") + include /src/pages/widgets/links + div#pages + include /src/pages/options/widgets/general + include /src/pages/options/widgets/services + include /src/pages/options/widgets/about + script(type="module" src="./index.js") + \ No newline at end of file diff --git a/src/pages/options/widgets/about.ejs b/src/pages/options/widgets/about.ejs deleted file mode 100644 index c6f8a58f..00000000 --- a/src/pages/options/widgets/about.ejs +++ /dev/null @@ -1,37 +0,0 @@ -
- -
-

About

-
- -
- -
- - - - - - - - - -
-

Forked from:

-

Privacy Redirect

-
- -
-
\ No newline at end of file diff --git a/src/pages/options/widgets/about.pug b/src/pages/options/widgets/about.pug new file mode 100644 index 00000000..93830a1d --- /dev/null +++ b/src/pages/options/widgets/about.pug @@ -0,0 +1,24 @@ +section(class="option-block" id="about_page") + div(class="some-block option-block") + h1(data-localise="__MSG_about__") About + hr + div(class="about") + div(class="some-block option-block") + h4 Donate: ♥️ + h4 + a(href="https://libredirect.github.io/donate") https://libredirect.github.io/donate + + div(class="some-block option-block") + h4 FAQ: + h4 + a(href="https://libredirect.github.io/faq") https://libredirect.github.io/faq + + div(class="some-block option-block") + h4 Docs: + h4 + a(href="https://libredirect.github.io/docs") https://libredirect.github.io/docs + + div(class="some-block option-block") + h4 Source Code: + h4 + a(href="https://libredirect.github.io/source_code") https://libredirect.github.io/source_code \ No newline at end of file diff --git a/src/pages/options/widgets/general.ejs b/src/pages/options/widgets/general.ejs deleted file mode 100644 index 6bb15bca..00000000 --- a/src/pages/options/widgets/general.ejs +++ /dev/null @@ -1,70 +0,0 @@ -
-
-

General

-
-
- -
-

Theme

- -
- -
-

Excluded from redirecting

-
- -
-
-
-   -   -
- -
-
- -
- -
- - - -
- -     - - -   Export Settings    - - - - - Reset Settings - -
- - -
\ No newline at end of file diff --git a/src/pages/options/widgets/general.pug b/src/pages/options/widgets/general.pug new file mode 100644 index 00000000..8a3f1859 --- /dev/null +++ b/src/pages/options/widgets/general.pug @@ -0,0 +1,57 @@ +section(class="option-block" id="general_page") + div(class="some-block option-block") + h1(data-localise="__MSG_general__") General + hr + + div(class="some-block option-block") + h4(data-localise="__MSG_theme__") Theme + select#theme + option(value="detect" data-localise="__MSG_detect__") Detect + option(value="light" data-localise="__MSG_light__") Light + option(value="dark" data-localise="__MSG_dark__") Dark + + div(class="some-block option-block") + h4(data-localise="__MSG_exclude_from_redirecting_") Excluded from redirecting + + form(id="custom-exceptions-instance-form") + div(class="some-block option-block") + div(class="some-block" style="padding: 0") + input(id="exceptions-custom-instance" placeholder="https://www.google.com" type="url") + |  + select(id="exceptions-custom-instance-type") + option(value="url") URL + option(value="regex") Regex + |  + button(class="add" id="exceptions-add-instance" type="submit") + svg(xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor") + path(d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z") + + hr + + div(class="checklist" id="exceptions-custom-checklist") + + div(class="buttons buttons-inline") + label(class="button button-inline" id="import_settings_text" for="import-settings") + svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") + path(d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z") + |  + x(data-localise="__MSG_importSettings__") Import Settings + input(class="button button-inline" id="import-settings" type="file" style="display: none") + + |   + + a(class="button button-inline" id="export-settings") + svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") + path(d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z") + |  + x(data-localise="__MSG_exportSettings__") Export Settings + + |   + + a(class="button button-inline" id="reset-settings") + svg(xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") + path(d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z") + path(d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z") + x(localise="__MSG_resetSettings__") Reset Settings + + script(type="module" src="./widgets/general.js") \ No newline at end of file diff --git a/src/pages/options/widgets/services.ejs b/src/pages/options/widgets/services.ejs deleted file mode 100644 index 20b4e8fa..00000000 --- a/src/pages/options/widgets/services.ejs +++ /dev/null @@ -1,76 +0,0 @@ -<% for (const service in config.services) { -%> -
-
-

<%= config.services[service].name %>

-
-
-
-

Enable

- -
-
-

Show in Popup

- -
- <% if (Object.keys(config.services[service].frontends).length> 1) { %> -
-

Frontend

- -
- <% if (config.services[service].embeddable) { _%> -
-

Embed Frontend

- -
- <% } _%> <% } _%> <% if (config.services[service].embeddable) { _%> -
-

Redirect Type

- -
- <% } _%> -
- <% for (const frontend in config.services[service].frontends) { -%> <% if (config.services[service].frontends[frontend].instanceList) { _%> -
- <% for (const network in config.networks) { -%> -
-
-

<%= network.charAt(0).toUpperCase() + network.slice(1) %>

-
-
-
- -
- <% if (network=="clearnet" ) { _%> - <% } _%> -
- <% } %> -
-

Custom Instances

-
-
-
- - -
-
-
- <% } _%> <% } %> -
-<% } %> - \ No newline at end of file diff --git a/src/pages/options/widgets/services.js b/src/pages/options/widgets/services.js index e9577260..06c560f8 100644 --- a/src/pages/options/widgets/services.js +++ b/src/pages/options/widgets/services.js @@ -40,24 +40,6 @@ function changeFrontendsSettings(service) { } } } - - if (config.services[service].embeddable) { - if (typeof divs[service].frontend !== "undefined") { - if (!config.services[service].frontends[divs[service].frontend.value].embeddable) { - divs[service].embedFrontend.disabled = false - for (const frontend in config.services[service].frontends) { - if (config.services[service].frontends[frontend].embeddable) { - const frontendDiv = document.getElementById(frontend) - if (frontend == divs[service].embedFrontend.value) { - frontendDiv.style.display = "block" - } else { - frontendDiv.style.display = "none" - } - } - } - } else if (Object.keys(config.services[service].frontends).length > 1) divs[service].embedFrontend.disabled = true - } - } } for (const service in config.services) { diff --git a/src/pages/options/widgets/services.pug b/src/pages/options/widgets/services.pug new file mode 100644 index 00000000..3a32f517 --- /dev/null +++ b/src/pages/options/widgets/services.pug @@ -0,0 +1,52 @@ +each val, service in services + section(class="option-block" id=service+"_page") + div(class="some-block option-block") + h1(data-localise="__MSG_"+service+"__")=services[service].name + + hr + + div(class="some-block option-block") + h4(data-localise="__MSG_enable__") Enable + input(id=service+"-enabled" type="checkbox") + + div(class="some-block option-block") + h4(data-localise="__MSG_show_in_popup__") Show in Popup + input(id=service type="checkbox") + + if Object.keys(services[service].frontends).length> 1 + div(class="some-block option-block") + h4(data-localise="__MSG_frontend__") Frontend + select(id=service+"-frontend") + each val, frontend in services[service].frontends + option(value=frontend)=services[service].frontends[frontend].name + + if services[service].embeddable + div(class="some-block option-block") + h4(data-localise="__MSG_redirectType__") Redirect Type + select(id=service+"-redirectType") + option(value="both" data-localise="__MSG_both__") both + option(value="sub_frame" data-localise="__MSG_onlyEmbedded__") Only Embedded + option(value="main_frame" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded + + hr + + each val, frontend in services[service].frontends + if services[service].frontends[frontend].instanceList + div(id=frontend) + each val, network in networks + div(class=network) + div(class="some-block option-block") + h4=network.charAt(0).toUpperCase() + network.slice(1) + div(class="checklist") + hr + div(class="some-block option-block") + h4(data-localise="__MSG_customInstances__") Custom Instances + form(class="custom-instance-form") + div(class="some-block option-block") + input(class="custom-instance" placeholder="http://<%= frontend %>.com" type="url" ) + button(class="add add-instance" type="submit") + svg(xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor") + path(d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z") + div(class="checklist custom-checklist") + + script(type="module" src="./widgets/services.js") diff --git a/src/pages/popup/index.html b/src/pages/popup/index.html new file mode 100644 index 00000000..9c37f116 --- /dev/null +++ b/src/pages/popup/index.html @@ -0,0 +1,1893 @@ + + + + + + + + General + + + + +
+
+
+

General

+
+
+
+

Theme

+ +
+
+

Excluded from redirecting

+
+
+
+
+   +   +
+ + + + +
+
+
+
+
+ +    + + +   + Export Settings   + + + + + Reset Settings +
+ +
+
+
+

Youtube

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+

Redirect Type

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

YT Music

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Twitter

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Redirect Type

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Instagram

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

TikTok

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Reddit

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Imgur

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Redirect Type

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Wikipedia

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Medium

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Quora

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

IMDb

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Reuters

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Fandom

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

PeerTube

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

LBRY

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+

Redirect Type

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Search

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Translate

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Maps

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+

Frontend

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Send Files

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

Paste Text

+
+
+
+

Enable

+ +
+
+

Show in Popup

+ +
+
+
+
+
+

Clearnet

+
+
+
+
+
+
+

Tor

+
+
+
+
+
+
+

I2p

+
+
+
+
+
+
+

Loki

+
+
+
+
+
+

Custom Instances

+
+
+
+ + +
+
+
+
+ +
+
+
+

About

+
+
+ +
+
+ + + \ No newline at end of file diff --git a/src/pages/popup/popup.ejs b/src/pages/popup/popup.ejs deleted file mode 100644 index 76aadda7..00000000 --- a/src/pages/popup/popup.ejs +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - -
- <%- include('src/pages/widgets/switches', {services: services}) -%> -
-
-
-
-
- <%- include('src/pages/widgets/switches', {services: services}) -%> -
-
-
- -

Change Instance

- - - -
-
-
-

Copy Raw

- - - -
-
-

Settings

- - - -
-
- - - - - \ No newline at end of file diff --git a/src/pages/popup/popup.pug b/src/pages/popup/popup.pug new file mode 100644 index 00000000..9a50f913 --- /dev/null +++ b/src/pages/popup/popup.pug @@ -0,0 +1,39 @@ +doctype html +html(lang="en") + head + meta(charset="UTF-8") + meta(name="viewport" content="width=device-width, initial-scale=1.0") + link(href="../stylesheets/styles.css" rel="stylesheet") + link(href="./style.css" rel="stylesheet") + body(dir="auto") + div(class="current_site") + include /src/pages/widgets/switches + div(id="current_site_divider") + hr + + div(class="all_sites") + include /src/pages/widgets/switches + + hr + + div(class="some-block" id="change_instance_div") + a(class="title button prevent" id="change_instance") + h4(data-localise="__MSG_switchInstance__") Change Instance + svg(xmlns="http://www.w3.org/2000/svg" height="26px" viewBox="0 0 24 24" width="26px" fill="currentColor") + path(d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z") + + div(class="some-block" id="copy_raw_div" title="Copy the original redirected link") + a(class="title button prevent" id="copy_raw") + h4(data-localise="__MSG_copyRaw__") Copy Raw + svg(xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor") + path(d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z") + + div(class="some-block") + a(class="title button prevent" id="more-options") + h4(data-localise="__MSG_settings__") Settings + svg(xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24" width="26px" fill="currentColor") + path(d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z") + + div(class="space") + script(type="module" src="../options/init.js") + script(type="module" src="./popup.js") \ No newline at end of file diff --git a/src/pages/widgets/head.ejs b/src/pages/widgets/head.ejs deleted file mode 100644 index d9e3802a..00000000 --- a/src/pages/widgets/head.ejs +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - General - - diff --git a/src/pages/widgets/head.pug b/src/pages/widgets/head.pug new file mode 100644 index 00000000..15e6d8d6 --- /dev/null +++ b/src/pages/widgets/head.pug @@ -0,0 +1,7 @@ +head + meta(charset="utf-8") + meta(name="viewport" content="width=device-width, initial-scale=1") + link(rel="icon" type="image/x-icon" href="../../../assets/images/libredirect.svg") + link(href="../stylesheets/styles.css" rel="stylesheet") + title General + script(type="module" src="./init.js") \ No newline at end of file diff --git a/src/pages/widgets/links.ejs b/src/pages/widgets/links.ejs deleted file mode 100644 index 2373a101..00000000 --- a/src/pages/widgets/links.ejs +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/src/pages/widgets/links.pug b/src/pages/widgets/links.pug new file mode 100644 index 00000000..8c5a3915 --- /dev/null +++ b/src/pages/widgets/links.pug @@ -0,0 +1,16 @@ +section(class="links" id="links") + div(class="title") + a(href="#general") + include /src/assets/images/general-icon.svg + span(data-localise="__MSG_general__") General + + each val, key in services + div(class="title") + a(href="#"+key) + img(src=`/assets/images/${key}-icon.${services[key].imageType}`) + span(data-localise="__MSG_"+key+"__")=services[key].name + + div(class="title") + a(href="#about") + img(src="/assets/images/about-icon.svg") + span(data-localise="__MSG_about__") About diff --git a/src/pages/widgets/switches.ejs b/src/pages/widgets/switches.ejs deleted file mode 100644 index e3ffdae7..00000000 --- a/src/pages/widgets/switches.ejs +++ /dev/null @@ -1,11 +0,0 @@ -<% for (const service in services) { -%> -
- <% if (services[service].imageType != "svgMono") { _%> - - <% } else { _%> - <%- include ('src/assets/images/' + service + '-icon.svg') %> - <% } _%> -

<%= services[service].name %>

- -
-<% } %> diff --git a/src/pages/widgets/switches.pug b/src/pages/widgets/switches.pug new file mode 100644 index 00000000..390c414d --- /dev/null +++ b/src/pages/widgets/switches.pug @@ -0,0 +1,6 @@ +each val, service in services + div(class=service + " some-block") + a(class="title" href=services[service].url) + img(src="../../assets/images/"+service+"-icon."+services[service].imageType) + h4(data-localise="__MSG_"+service+"__")=services[service].name + input(class=service + "-enabled" type="checkbox") \ No newline at end of file -- cgit 1.4.1