Compare commits
No commits in common. "master" and "v1.1.36" have entirely different histories.
|
@ -1,4 +1,2 @@
|
||||||
web-ext-artifacts/
|
web-ext-artifacts/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
nod
|
|
||||||
node_modules
|
|
||||||
|
|
695
LICENSE
|
@ -1,674 +1,21 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
MIT License
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
Copyright (c) 2019 Simon Brazell
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this license document, but changing it is not allowed.
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
Preamble
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
The GNU General Public License is a free, copyleft license for
|
furnished to do so, subject to the following conditions:
|
||||||
software and other kinds of works.
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
The licenses for most software and other practical works are designed
|
copies or substantial portions of the Software.
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
share and change all versions of a program--to make sure it remains free
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
GNU General Public License for most of our software; it applies also to
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
any other work released this way by its authors. You can apply it to
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
your programs, too.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
|
|
78
README.md
|
@ -1,77 +1,19 @@
|
||||||
# ![privacy-redirect](src/assets/images/logo-small.png)
|
# ![privacy-redirect](assets/images/logo-small.png)
|
||||||
|
|
||||||
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)
|
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/SimonBrazell/donate) [![Buy me a coffee](assets/images/buy-me-a-coffee.png)](https://www.buymeacoffee.com/SimonBrazell)
|
||||||
|
|
||||||
## Get
|
[![Firefox Add-on](assets/images/amo-badge.png)](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/) [![Chrome Extension](assets/images/chrome-badge.png)](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb)
|
||||||
|
|
||||||
[![Firefox Add-on](src/assets/images/badge-amo.png)](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/)
|
A web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/omarroth/invidious), [Bibliogram](https://github.com/cloudrac3r/bibliogram) & [OpenStreetMap](https://www.openstreetmap.org/).
|
||||||
[![Chrome Extension](src/assets/images/badge-chrome.png)](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb)
|
|
||||||
[![Edge Extension](src/assets/images/badge-ms.png)](https://microsoftedge.microsoft.com/addons/detail/privacy-redirect/elnabkhcgpajchapppkhiaifkgikgihj)
|
|
||||||
|
|
||||||
## Donate
|
Allows for setting custom [Nitter](https://github.com/zedeus/nitter/wiki/Instances), [Invidious](https://github.com/omarroth/invidious/wiki/Invidious-Instances), [Bibliogram](https://github.com/cloudrac3r/bibliogram/wiki/Instances) & [OpenStreetMap](https://wiki.openstreetmap.org/wiki/Tile_servers) instances and toggling all redirects on & off.
|
||||||
|
|
||||||
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/SimonBrazell/donate) [![Buy me a coffee](src/assets/images/buy-me-a-coffee.png)](https://www.buymeacoffee.com/SimonBrazell)
|
## Build
|
||||||
|
|
||||||
- **FIRO** `aEyKPU7mwWBYRFGoLiUGeQQybyzD8jzsS8`
|
1. `npm install --global web-ext`
|
||||||
- **BTC:** `3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE`
|
2. `web-ext build --overwrite-dest`
|
||||||
- **ETH:** `0x90049dc59365dF683451319Aa4632aC61193dFA7`
|
3. See `web-ext-artifacts/` for outputs.
|
||||||
|
|
||||||
<img src="https://img.shields.io/liberapay/receives/SimonBrazell.svg?logo=liberapay">
|
|
||||||
|
|
||||||
## About
|
|
||||||
|
|
||||||
A web extension that redirects _Twitter, YouTube, Instagram, Google Maps, Reddit, Google Search, & Google Translate_ requests to privacy friendly alternative frontends for those sites - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/iv-org/invidious), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Bibliogram](https://sr.ht/~cadence/bibliogram/), [OpenStreetMap](https://www.openstreetmap.org/), [SimplyTranslate](https://git.sr.ht/~metalune/simplytranslate_web) & Private Search Engines like [DuckDuckGo](https://duckduckgo.com) and [Startpage](https://startpage.com).
|
|
||||||
|
|
||||||
It's possible to toggle all redirects on and off. The extension will default to using random instances if none are selected. If these instances are not working, you can try and set a custom instance from the list below.
|
|
||||||
|
|
||||||
### Custom instances
|
|
||||||
|
|
||||||
Privacy Redirect allows setting custom instances, instances can be found here:
|
|
||||||
|
|
||||||
- [Nitter instances](https://github.com/zedeus/nitter/wiki/Instances)
|
|
||||||
- [Invidious instances](https://docs.invidious.io/Invidious-Instances.md)
|
|
||||||
- [Bibliogram instances](https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md)
|
|
||||||
- [SimplyTranslate instances](https://git.sr.ht/~metalune/simplytranslate_web#list-of-instances)
|
|
||||||
- [OpenStreetMap tile servers](https://wiki.openstreetmap.org/wiki/Tile_servers)
|
|
||||||
- Reddit alternatives:
|
|
||||||
- [Libreddit](https://github.com/spikecodes/libreddit#instances)
|
|
||||||
- [Teddit](https://codeberg.org/teddit/teddit#instances)
|
|
||||||
- [Snew](https://github.com/snew/snew)
|
|
||||||
- [Old Reddit](https://old.reddit.com) & [Mobile Reddit](https://i.reddit.com), purported to be more privacy respecting than the new UI.
|
|
||||||
- Google Search alternatives:
|
|
||||||
- [SearX](https://searx.github.io/searx/)
|
|
||||||
- [DuckDuckGo](https://duckduckgo.com)
|
|
||||||
- [Startpage](https://startpage.com)
|
|
||||||
- [Ecosia](https://www.ecosia.org)
|
|
||||||
- [Qwant](https://www.qwant.com)
|
|
||||||
- [Mojeek](https://www.mojeek.com)
|
|
||||||
- [Presearch](https://www.presearch.org)
|
|
||||||
- [Whoogle](https://benbusby.com/projects/whoogle-search/)
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
### Install Dependencies
|
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/) >=10.0.0 installed
|
|
||||||
- `npm install`
|
|
||||||
|
|
||||||
### Build
|
|
||||||
|
|
||||||
- `npm run build`
|
|
||||||
- `open web-ext-artifacts/`
|
|
||||||
|
|
||||||
## Test
|
|
||||||
|
|
||||||
- `npm run test`
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[GPLv3](LICENSE).
|
Code released under [the MIT license](LICENSE.txt).
|
||||||
|
|
||||||
## Permissions
|
|
||||||
|
|
||||||
Please note, access to all website navigation events ( all URLs), not just the target domains, is required to allow embedded video redirects to occur. At this time I know of no other way to achieve iframe redirects, happy to hear some suggestions on this though 🙂
|
|
||||||
|
|
||||||
## Privacy Policy
|
|
||||||
|
|
||||||
See the [Project Wiki](https://github.com/SimonBrazell/privacy-redirect/wiki/Privacy-Policy).
|
|
||||||
|
|
|
@ -4,95 +4,87 @@
|
||||||
"description": "Name of the extension."
|
"description": "Name of the extension."
|
||||||
},
|
},
|
||||||
"extensionDescription": {
|
"extensionDescription": {
|
||||||
"message": "将 Twitter、YouTube、Instagram 和 Google Maps 重定向至尊重隐私的替代品",
|
"message": "Redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.",
|
||||||
"description": "Description of the extension."
|
"description": "Description of the extension."
|
||||||
},
|
},
|
||||||
"nitterInstance": {
|
"nitterInstance": {
|
||||||
"message": "Nitter 实例",
|
"message": "Nitter Instance",
|
||||||
"description": "Label for Nitter instance field option (options)."
|
"description": "Label for Nitter instance field option (options)."
|
||||||
},
|
},
|
||||||
"invidiousInstance": {
|
"invidiousInstance": {
|
||||||
"message": "Invidious 实例",
|
"message": "Invidious Instance",
|
||||||
"description": "Label for Invidious instance field option (options)."
|
"description": "Label for Invidious instance field option (options)."
|
||||||
},
|
},
|
||||||
"bibliogramInstance": {
|
"bibliogramInstance": {
|
||||||
"message": "Bibliogram 实例",
|
"message": "Bibliogram Instance",
|
||||||
"description": "Label for Bibliogram instance field option (options)."
|
"description": "Label for Bibliogram instance field option (options)."
|
||||||
},
|
},
|
||||||
"osmInstance": {
|
"osmInstance": {
|
||||||
"message": "OpenStreetMap 实例",
|
"message": "OpenStreetMap Instance",
|
||||||
"description": "Label for OSM instance field option (options)."
|
"description": "Label for OSM instance field option (options)."
|
||||||
},
|
},
|
||||||
"disableNitter": {
|
"disableNitter": {
|
||||||
"message": "Nitter 重定向",
|
"message": "Nitter Redirects",
|
||||||
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
|
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
|
||||||
},
|
},
|
||||||
"disableInvidious": {
|
"disableInvidious": {
|
||||||
"message": "Invidious 重定向",
|
"message": "Invidious Redirects",
|
||||||
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
|
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
|
||||||
},
|
},
|
||||||
"disableBibliogram": {
|
"disableBibliogram": {
|
||||||
"message": "Bibliogram 重定向",
|
"message": "Bibliogram Redirects",
|
||||||
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
|
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
|
||||||
},
|
},
|
||||||
"disableOsm": {
|
"disableOsm": {
|
||||||
"message": "OpenStreetMap 重定向",
|
"message": "OpenStreetMap Redirects",
|
||||||
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
|
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
|
||||||
},
|
},
|
||||||
"alwaysProxy": {
|
"alwaysProxy": {
|
||||||
"message": "使用 Invidious 时始终使用视频代理",
|
"message": "Always proxy videos through Invidious",
|
||||||
"description": "Label for 'Always proxy videos through Invidious' option (options)."
|
"description": "Label for 'Always proxy videos through Invidious' option (options)."
|
||||||
},
|
},
|
||||||
"onlyEmbeddedVideo": {
|
"onlyEmbeddedVideo": {
|
||||||
"message": "只重定向嵌入视频至 Invidious",
|
"message": "Only redirect embedded video to Invidious",
|
||||||
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
|
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
|
||||||
},
|
},
|
||||||
"videoQuality": {
|
"videoQuality": {
|
||||||
"message": "Invidious 视频画质",
|
"message": "Invidious Video Quality",
|
||||||
"description": "Label for 'Invidious Video Quality' option (options)."
|
"description": "Label for 'Invidious Video Quality' option (options)."
|
||||||
},
|
},
|
||||||
"removeTwitterSW": {
|
"removeTwitterSW": {
|
||||||
"message": "主动移除 Twitter 后台脚本",
|
"message": "Proactively remove Twitter service worker",
|
||||||
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
|
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
|
||||||
},
|
},
|
||||||
"invidiousDarkMode": {
|
"invidiousDarkMode": {
|
||||||
"message": "Invidious 始终使用夜间模式",
|
"message": "Invidious dark mode always on",
|
||||||
"description": "Label for 'Invidious dark mode always on' option (options)."
|
"description": "Label for 'Invidious dark mode always on' option (options)."
|
||||||
},
|
},
|
||||||
"persistInvidiousPrefs": {
|
"persistInvidiousPrefs": {
|
||||||
"message": "以 cookie 形式记住 Invidious 设置",
|
"message": "Persist Invidious preferences (as cookie)",
|
||||||
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
|
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
|
||||||
},
|
},
|
||||||
"generalTab": {
|
"generalTab": {
|
||||||
"message": "常规",
|
"message": "General",
|
||||||
"description": "General tab (options)."
|
"description": "General tab (options)."
|
||||||
},
|
},
|
||||||
"advancedTab": {
|
"advancedTab": {
|
||||||
"message": "高级",
|
"message": "Advanced",
|
||||||
"description": "Advanced tab (options)."
|
"description": "Advanced tab (options)."
|
||||||
},
|
},
|
||||||
"exceptionsTab": {
|
"exceptionsTab": {
|
||||||
"message": "例外",
|
"message": "Exceptions",
|
||||||
"description": "Exceptions tab (options)."
|
"description": "Exceptions tab (options)."
|
||||||
},
|
},
|
||||||
"exceptionsDescriptionP1": {
|
"exceptionsDescription": {
|
||||||
"message": "请输入一个不要重定向 URL 链接或正则表达式。",
|
"message": "<p>Enter a URL or Regular Expression to be excluded from redirects.</p><p>All requests for or initiating from a URL that matches the exception will be excluded from redirects.</p><p><b>Note -</b> Supports JavaScript regular expressions, excluding the enclosing forward slashes.</p>",
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
|
"description": "A description of the 'Exceptions' feature (options)."
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "若发起请求或访问的页面 URL 符合任一表达式,则插件将不会将其重定向。",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "注:支持 JavaScript 正则表达式,且无须用正斜杠始末。",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
|
|
||||||
},
|
},
|
||||||
"addException": {
|
"addException": {
|
||||||
"message": "添加例外",
|
"message": "Add Exception",
|
||||||
"description": "'Add Exceptions' button (options)."
|
"description": "'Add Exceptions' button (options)."
|
||||||
},
|
},
|
||||||
"moreOptions": {
|
"moreOptions": {
|
||||||
"message": "更多设置",
|
"message": "More Options",
|
||||||
"description": "More Options button (pop-up)."
|
"description": "More Options button (pop-up)."
|
||||||
},
|
},
|
||||||
"privacy": {
|
"privacy": {
|
||||||
|
@ -102,9 +94,5 @@
|
||||||
"redirect": {
|
"redirect": {
|
||||||
"message": "Redirect",
|
"message": "Redirect",
|
||||||
"description": "Extension title - Redirect (pop-up)."
|
"description": "Extension title - Redirect (pop-up)."
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "版本",
|
|
||||||
"description": "Version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -52,16 +52,16 @@
|
||||||
"description": "Libellé pour l'option 'Qualité des vidéos Invidious' (options)."
|
"description": "Libellé pour l'option 'Qualité des vidéos Invidious' (options)."
|
||||||
},
|
},
|
||||||
"removeTwitterSW": {
|
"removeTwitterSW": {
|
||||||
"message": "Supprimer proactivement le service worker de Twitter",
|
"message": "Supprimer proactivement le service Twitter",
|
||||||
"description": "Libellé pour l'option 'Supprimer proactivement le service worker de Twitter' (options)."
|
"description": "Libellé pour l'option 'Supprimer proactivement le service Twitter' (options)."
|
||||||
},
|
},
|
||||||
"invidiousDarkMode": {
|
"invidiousDarkMode": {
|
||||||
"message": "Mode sombre toujours activé pour Invidious",
|
"message": "Mode sombre toujours activé pour Invidious",
|
||||||
"description": "Libellé pour l'option 'Mode sombre toujours activé pour Invidious' (options)."
|
"description": "Libellé pour l'option 'Mode sombre toujours activé pour Invidious' (options)."
|
||||||
},
|
},
|
||||||
"persistInvidiousPrefs": {
|
"persistInvidiousPrefs": {
|
||||||
"message": "Conserver les préférences d’Invidious (sous forme de cookie)",
|
"message": "Conserver les préférences malveillantes (sous forme de cookie)",
|
||||||
"description": "Libellé pour 'Conserver les préférences d’Invidious (sous forme de cookie)' option (options)."
|
"description": "Libellé pour 'Conserver les préférences malveillantes (sous forme de cookie)' option (options)."
|
||||||
},
|
},
|
||||||
"generalTab": {
|
"generalTab": {
|
||||||
"message": "Général",
|
"message": "Général",
|
||||||
|
@ -75,16 +75,8 @@
|
||||||
"message": "Exceptions",
|
"message": "Exceptions",
|
||||||
"description": "Onglet des Exceptions dans les options."
|
"description": "Onglet des Exceptions dans les options."
|
||||||
},
|
},
|
||||||
"exceptionsDescriptionP1": {
|
"exceptionsDescription": {
|
||||||
"message": "Entrez une adresse URL ou une expression régulière qui sera exclue des redirections.",
|
"message": "<p>Entrez une adresse URL ou une expression régulière qui sera exclue des redirections.</p><p>All requests for or initiating from a URL that matches the exception will be excluded from redirects.</p><p><b>Note -</b> Supports JavaScript regular expressions, excluding the enclosing forward slashes.</p>",
|
||||||
"description": "Description pour la rubrique 'Exceptions' dans les options."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Toutes les demandes émanant d'une adresse URL et correspondant à l'exception seront exclues des redirections.",
|
|
||||||
"description": "Description pour la rubrique 'Exceptions' dans les options."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Remarque - Prend en charge les expressions régulières JavaScript, à l'exclusion des barres slash.",
|
|
||||||
"description": "Description pour la rubrique 'Exceptions' dans les options."
|
"description": "Description pour la rubrique 'Exceptions' dans les options."
|
||||||
},
|
},
|
||||||
"addException": {
|
"addException": {
|
||||||
|
@ -96,15 +88,11 @@
|
||||||
"description": "Boutton des options supplémentaires (pop-up)."
|
"description": "Boutton des options supplémentaires (pop-up)."
|
||||||
},
|
},
|
||||||
"privacy": {
|
"privacy": {
|
||||||
"message": "Vie privée",
|
"message": "Privacy",
|
||||||
"description": "Titre du module complémentaire - Vie privée (pop-up)."
|
"description": "Titre du module complémentaire - Vie privée (pop-up)."
|
||||||
},
|
},
|
||||||
"redirect": {
|
"redirect": {
|
||||||
"message": "Redirection",
|
"message": "Redirect",
|
||||||
"description": "Titre du module complémentaire - Redirection (pop-up)."
|
"description": "Titre du module complémentaire - Redirection (pop-up)."
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Version",
|
|
||||||
"description": "Version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -23,18 +23,6 @@
|
||||||
"message": "Сервис OpenStreetMap",
|
"message": "Сервис OpenStreetMap",
|
||||||
"description": "Название настройки (в настройках) поля сервиса OSM."
|
"description": "Название настройки (в настройках) поля сервиса OSM."
|
||||||
},
|
},
|
||||||
"redditInstance": {
|
|
||||||
"message": "Сервис Reddit",
|
|
||||||
"description": "Название настройки (в настройках) поля сервиса Reddit."
|
|
||||||
},
|
|
||||||
"searchEngineInstance": {
|
|
||||||
"message": "Сервис поисковой системы",
|
|
||||||
"description": "Название настройки (в настройках) поля сервиса поисковой системы."
|
|
||||||
},
|
|
||||||
"simplyTranslateInstance": {
|
|
||||||
"message": "Сервис SimplyTranslate",
|
|
||||||
"description": "Название настройки (в настройках) поля сервиса SimplyTranslate."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
"disableNitter": {
|
||||||
"message": "Перенаправление на Nitter",
|
"message": "Перенаправление на Nitter",
|
||||||
"description": "Название настройки для включения/выключения перенаправления на Nitter (в настройках и всплывающем окне)."
|
"description": "Название настройки для включения/выключения перенаправления на Nitter (в настройках и всплывающем окне)."
|
||||||
|
@ -51,22 +39,6 @@
|
||||||
"message": "Перенаправление на OpenStreetMap",
|
"message": "Перенаправление на OpenStreetMap",
|
||||||
"description": "Название настройки для включения/выключения перенаправления на OSM (в настройках и всплывающем окне)."
|
"description": "Название настройки для включения/выключения перенаправления на OSM (в настройках и всплывающем окне)."
|
||||||
},
|
},
|
||||||
"disableReddit": {
|
|
||||||
"message": "Перенаправление Reddit",
|
|
||||||
"description": "Название настройки для включения/выключения перенаправления Reddit (в настройках и всплывающем окне)."
|
|
||||||
},
|
|
||||||
"disableSearchEngine": {
|
|
||||||
"message": "Перенаправление поисковой системы",
|
|
||||||
"description": "Название настройки для включения/выключения перенаправления поисковой системы (в настройках и всплывающем окне)."
|
|
||||||
},
|
|
||||||
"disableSimplyTranslate": {
|
|
||||||
"message": "Перенаправление на SimplyTranslate",
|
|
||||||
"description": "Название настройки для включения/выключения перенаправления на SimplyTranslate (в настройках и всплывающем окне)."
|
|
||||||
},
|
|
||||||
"theme": {
|
|
||||||
"message": "Тема",
|
|
||||||
"description": "Название настройки для 'Тема' (в настройках)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
"alwaysProxy": {
|
||||||
"message": "Всегда проксировать видео через Invidious",
|
"message": "Всегда проксировать видео через Invidious",
|
||||||
"description": "Название настройки для 'Всегда проксировать видео через Invidious' (в настройках)."
|
"description": "Название настройки для 'Всегда проксировать видео через Invidious' (в настройках)."
|
||||||
|
@ -119,16 +91,8 @@
|
||||||
"message": "Исключения",
|
"message": "Исключения",
|
||||||
"description": "Вкладка 'Исключения' (в настройках)."
|
"description": "Вкладка 'Исключения' (в настройках)."
|
||||||
},
|
},
|
||||||
"exceptionsDescriptionP1": {
|
"exceptionsDescription": {
|
||||||
"message": "Введите URL или регулярное выражение для исключения из перенаправлений.",
|
"message": "<p>Введите URL или регулярное выражение для исключения из перенаправлений.</p><p>Все запросы на URL, совпадающие с исключениями, или инициированные с них будут исключены из перенаправлений.</p><p><b>Примечание:</b> Поддерживает регулярные выражения JavaScript, кроме закрывающих обратных слэшей.</p>",
|
||||||
"description": "Описание функции 'Исключения' (в настройках)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Все запросы на URL, совпадающие с исключениями, или инициированные с них будут исключены из перенаправлений.",
|
|
||||||
"description": "Описание функции 'Исключения' (в настройках)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Примечание: Поддерживает регулярные выражения JavaScript, кроме закрывающих обратных слэшей.",
|
|
||||||
"description": "Описание функции 'Исключения' (в настройках)."
|
"description": "Описание функции 'Исключения' (в настройках)."
|
||||||
},
|
},
|
||||||
"addException": {
|
"addException": {
|
||||||
|
@ -146,29 +110,5 @@
|
||||||
"redirect": {
|
"redirect": {
|
||||||
"message": "Redirect",
|
"message": "Redirect",
|
||||||
"description": "Название расширения - Redirect (во всплывающем окне)."
|
"description": "Название расширения - Redirect (во всплывающем окне)."
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Версия",
|
|
||||||
"description": "Версия."
|
|
||||||
},
|
|
||||||
"useFreeTube": {
|
|
||||||
"message": "Использовать FreeTube поверх Invidious при возможности",
|
|
||||||
"description": "Название настройки для 'Использовать FreeTube поверх Invidious при возможности' (в настройках)."
|
|
||||||
},
|
|
||||||
"nitterRandomPool": {
|
|
||||||
"message": "Список случайных сервисов Nitter (разделяется запятой)",
|
|
||||||
"description": "Название настройки для 'Список случайных сервисов Nitter (разделяется запятой)' (в настройках)."
|
|
||||||
},
|
|
||||||
"invidiousRandomPool": {
|
|
||||||
"message": "Список случайных сервисов Invidious (разделяется запятой)",
|
|
||||||
"description": "Название настройки для 'Список случайных сервисов Invidious (разделяется запятой)' (в настройках)."
|
|
||||||
},
|
|
||||||
"bibliogramRandomPool": {
|
|
||||||
"message": "Список случайных сервисов Bibliogram (разделяется запятой)",
|
|
||||||
"description": "Название настройки для 'Список случайных сервисов Bibliogram (разделяется запятой)' (в настройках)."
|
|
||||||
},
|
|
||||||
"randomInstancePlaceholder": {
|
|
||||||
"message": "Случайный сервис (ничего не выбрано)",
|
|
||||||
"description": "Заглушка в настройках сервиса провайдера с выбором случайного сервиса из списка, если ничего не выбрано"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
After Width: | Height: | Size: 454 KiB |
After Width: | Height: | Size: 875 KiB |
After Width: | Height: | Size: 270 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 640 KiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 433 KiB |
After Width: | Height: | Size: 3.7 MiB |
After Width: | Height: | Size: 490 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 976 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 35 KiB |
|
@ -0,0 +1,19 @@
|
||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
function localizeHtmlPage() {
|
||||||
|
// Localize using __MSG_***__ data tags
|
||||||
|
var data = document.querySelectorAll('[data-localize]');
|
||||||
|
|
||||||
|
for (var i in data) if (data.hasOwnProperty(i)) {
|
||||||
|
var obj = data[i];
|
||||||
|
var tag = obj.getAttribute('data-localize').toString();
|
||||||
|
|
||||||
|
var msg = tag.replace(/__MSG_(\w+)__/g, function (_match, v1) {
|
||||||
|
return v1 ? browser.i18n.getMessage(v1) : null;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (msg && msg !== tag) obj.innerHTML = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
localizeHtmlPage();
|
|
@ -1,23 +1,23 @@
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
function getCookie() {
|
function getCookie() {
|
||||||
let ca = document.cookie.split(";");
|
let ca = document.cookie.split(';');
|
||||||
for (let i = 0; i < ca.length; i++) {
|
for (let i = 0; i < ca.length; i++) {
|
||||||
let c = ca[i];
|
let c = ca[i];
|
||||||
while (c.charAt(0) == " ") c = c.substring(1, c.length);
|
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||||
if (c.indexOf("PREFS=") == 0) {
|
if (c.indexOf('PREFS=') == 0) {
|
||||||
return JSON.parse(
|
return JSON.parse(
|
||||||
decodeURIComponent(c.substring("PREFS=".length, c.length))
|
decodeURIComponent(c.substring('PREFS='.length, c.length))
|
||||||
);
|
)
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.storage.sync.get(
|
browser.storage.sync.get(
|
||||||
["alwaysProxy", "videoQuality", "invidiousDarkMode", "persistInvidiousPrefs"],
|
['alwaysProxy', 'videoQuality', 'invidiousDarkMode', 'persistInvidiousPrefs'],
|
||||||
(result) => {
|
(result) => {
|
||||||
if (result.persistInvidiousPrefs) {
|
if (result.persistInvidiousPrefs) {
|
||||||
const prefs = getCookie();
|
const prefs = getCookie();
|
|
@ -0,0 +1,71 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const nitterDefault = 'https://nitter.net';
|
||||||
|
|
||||||
|
let disableNitter;
|
||||||
|
let nitterInstance;
|
||||||
|
let redirectBypassFlag;
|
||||||
|
let exceptions;
|
||||||
|
|
||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
function isNotException(url) {
|
||||||
|
return !exceptions.some(regex => (regex.test(url.href)));
|
||||||
|
}
|
||||||
|
|
||||||
|
function shouldRedirect(url) {
|
||||||
|
return !redirectBypassFlag &&
|
||||||
|
isNotException(url) &&
|
||||||
|
!disableNitter &&
|
||||||
|
url.host !== nitterInstance &&
|
||||||
|
!url.pathname.includes('/home');
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectTwitter(url) {
|
||||||
|
if (url.host.split('.')[0] === 'pbs') {
|
||||||
|
return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
|
||||||
|
} else if (url.host.split('.')[0] === 'video') {
|
||||||
|
return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
|
||||||
|
} else {
|
||||||
|
return `${nitterInstance}${url.pathname}${url.search}`;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
browser.storage.sync.get(
|
||||||
|
[
|
||||||
|
'nitterInstance',
|
||||||
|
'disableNitter',
|
||||||
|
'removeTwitterSW',
|
||||||
|
'redirectBypassFlag',
|
||||||
|
'exceptions'
|
||||||
|
],
|
||||||
|
(result) => {
|
||||||
|
redirectBypassFlag = result.redirectBypassFlag;
|
||||||
|
browser.storage.sync.set({
|
||||||
|
redirectBypassFlag: false
|
||||||
|
});
|
||||||
|
if (!result.removeTwitterSW) {
|
||||||
|
disableNitter = result.disableNitter;
|
||||||
|
nitterInstance = result.nitterInstance || nitterDefault;
|
||||||
|
exceptions = result.exceptions ? result.exceptions.map(e => {
|
||||||
|
return new RegExp(e);
|
||||||
|
}) : [];
|
||||||
|
navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||||
|
for (let registration of registrations) {
|
||||||
|
if (registration.scope === 'https://twitter.com/') {
|
||||||
|
registration.unregister();
|
||||||
|
console.log('Unregistered Twitter SW', registration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const url = new URL(window.location);
|
||||||
|
if (shouldRedirect()) {
|
||||||
|
const redirect = redirectTwitter(url);
|
||||||
|
console.info(
|
||||||
|
'Redirecting', `"${url.href}"`, '=>', `"${redirect}"`
|
||||||
|
);
|
||||||
|
window.location = redirect;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
|
@ -0,0 +1,460 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const invidiousDefault = 'https://invidio.us';
|
||||||
|
const youtubeDomains = [
|
||||||
|
'm.youtube.com',
|
||||||
|
'youtube.com',
|
||||||
|
'img.youtube.com',
|
||||||
|
'www.youtube.com',
|
||||||
|
'youtube-nocookie.com',
|
||||||
|
'www.youtube-nocookie.com',
|
||||||
|
'youtu.be',
|
||||||
|
's.ytimg.com',
|
||||||
|
'music.youtube.com'
|
||||||
|
];
|
||||||
|
const nitterDefault = 'https://nitter.net';
|
||||||
|
const twitterDomains = [
|
||||||
|
'twitter.com',
|
||||||
|
'www.twitter.com',
|
||||||
|
'mobile.twitter.com',
|
||||||
|
'pbs.twimg.com',
|
||||||
|
'video.twimg.com',
|
||||||
|
];
|
||||||
|
const bibliogramDefault = 'https://bibliogram.art';
|
||||||
|
const instagramDomains = [
|
||||||
|
"instagram.com",
|
||||||
|
"www.instagram.com",
|
||||||
|
"help.instagram.com",
|
||||||
|
"about.instagram.com",
|
||||||
|
];
|
||||||
|
const instagramReservedPaths = [
|
||||||
|
'about',
|
||||||
|
'explore',
|
||||||
|
'support',
|
||||||
|
'press',
|
||||||
|
'api',
|
||||||
|
'privacy',
|
||||||
|
'safety',
|
||||||
|
'admin',
|
||||||
|
'graphql',
|
||||||
|
'accounts',
|
||||||
|
'help',
|
||||||
|
'terms',
|
||||||
|
'contact',
|
||||||
|
'blog',
|
||||||
|
'igtv',
|
||||||
|
'u',
|
||||||
|
'p',
|
||||||
|
'fragment',
|
||||||
|
'imageproxy',
|
||||||
|
'videoproxy',
|
||||||
|
'.well-known'
|
||||||
|
];
|
||||||
|
const bibliogramBypassPaths = /\/(accounts\/|embeds?.js)/;
|
||||||
|
const bibliogramInstances = [
|
||||||
|
'https://bibliogram.art',
|
||||||
|
'https://bibliogram.snopyta.org'
|
||||||
|
];
|
||||||
|
const osmDefault = 'https://openstreetmap.org';
|
||||||
|
const googleMapsRegex = /https?:\/\/(((www|maps)\.)?(google\.).*(\/maps)|maps\.(google\.).*)/;
|
||||||
|
const mapCentreRegex = /@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/;
|
||||||
|
const dataLatLngRegex = /(!3d|!4d)(-?[0-9]{1,10}.[0-9]{1,10})/g;
|
||||||
|
const placeRegex = /\/place\/(.*)\//;
|
||||||
|
const travelModes = {
|
||||||
|
'driving': 'fossgis_osrm_car',
|
||||||
|
'walking': 'fossgis_osrm_foot',
|
||||||
|
'bicycling': 'fossgis_osrm_bike',
|
||||||
|
'transit': 'fossgis_osrm_car' // not implemented on OSM, default to car.
|
||||||
|
};
|
||||||
|
const layers = {
|
||||||
|
'none': 'S',
|
||||||
|
'transit': 'T',
|
||||||
|
'traffic': 'S', // not implemented on OSM, default to standard.
|
||||||
|
'bicycling': 'C'
|
||||||
|
}
|
||||||
|
|
||||||
|
let disableNitter;
|
||||||
|
let disableInvidious;
|
||||||
|
let disableBibliogram;
|
||||||
|
let disableOsm;
|
||||||
|
let nitterInstance;
|
||||||
|
let invidiousInstance;
|
||||||
|
let bibliogramInstance;
|
||||||
|
let osmInstance;
|
||||||
|
let alwaysProxy;
|
||||||
|
let onlyEmbeddedVideo;
|
||||||
|
let videoQuality;
|
||||||
|
let invidiousDarkMode;
|
||||||
|
let invidiousVolume;
|
||||||
|
let invidiousPlayerStyle;
|
||||||
|
let invidiousSubtitles;
|
||||||
|
let invidiousAutoplay;
|
||||||
|
let exceptions;
|
||||||
|
|
||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
browser.storage.sync.get(
|
||||||
|
[
|
||||||
|
'nitterInstance',
|
||||||
|
'invidiousInstance',
|
||||||
|
'bibliogramInstance',
|
||||||
|
'osmInstance',
|
||||||
|
'disableNitter',
|
||||||
|
'disableInvidious',
|
||||||
|
'disableBibliogram',
|
||||||
|
'disableOsm',
|
||||||
|
'alwaysProxy',
|
||||||
|
'onlyEmbeddedVideo',
|
||||||
|
'videoQuality',
|
||||||
|
'invidiousDarkMode',
|
||||||
|
'invidiousVolume',
|
||||||
|
'invidiousPlayerStyle',
|
||||||
|
'invidiousSubtitles',
|
||||||
|
'invidiousAutoplay',
|
||||||
|
'exceptions'
|
||||||
|
],
|
||||||
|
result => {
|
||||||
|
disableNitter = result.disableNitter;
|
||||||
|
disableInvidious = result.disableInvidious;
|
||||||
|
disableBibliogram = result.disableBibliogram;
|
||||||
|
disableOsm = result.disableOsm;
|
||||||
|
nitterInstance = result.nitterInstance || nitterDefault;
|
||||||
|
invidiousInstance = result.invidiousInstance || invidiousDefault;
|
||||||
|
bibliogramInstance = result.bibliogramInstance || bibliogramDefault;
|
||||||
|
osmInstance = result.osmInstance || osmDefault;
|
||||||
|
alwaysProxy = result.alwaysProxy;
|
||||||
|
onlyEmbeddedVideo = result.onlyEmbeddedVideo;
|
||||||
|
videoQuality = result.videoQuality;
|
||||||
|
invidiousDarkMode = result.invidiousDarkMode;
|
||||||
|
exceptions = result.exceptions ? result.exceptions.map(e => {
|
||||||
|
return new RegExp(e);
|
||||||
|
}) : [];
|
||||||
|
invidiousVolume = result.invidiousVolume;
|
||||||
|
invidiousPlayerStyle = result.invidiousPlayerStyle;
|
||||||
|
invidiousSubtitles = result.invidiousSubtitles || '';
|
||||||
|
invidiousAutoplay = !result.invidiousAutoplay;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
browser.storage.onChanged.addListener(changes => {
|
||||||
|
if ('nitterInstance' in changes) {
|
||||||
|
nitterInstance = changes.nitterInstance.newValue || nitterDefault;
|
||||||
|
}
|
||||||
|
if ('invidiousInstance' in changes) {
|
||||||
|
invidiousInstance = changes.invidiousInstance.newValue || invidiousDefault;
|
||||||
|
}
|
||||||
|
if ('bibliogramInstance' in changes) {
|
||||||
|
bibliogramInstance = changes.bibliogramInstance.newValue || bibliogramDefault;
|
||||||
|
}
|
||||||
|
if ('osmInstance' in changes) {
|
||||||
|
osmInstance = changes.osmInstance.newValue || osmDefault;
|
||||||
|
}
|
||||||
|
if ('disableNitter' in changes) {
|
||||||
|
disableNitter = changes.disableNitter.newValue;
|
||||||
|
}
|
||||||
|
if ('disableInvidious' in changes) {
|
||||||
|
disableInvidious = changes.disableInvidious.newValue;
|
||||||
|
}
|
||||||
|
if ('disableBibliogram' in changes) {
|
||||||
|
disableBibliogram = changes.disableBibliogram.newValue;
|
||||||
|
}
|
||||||
|
if ('disableOsm' in changes) {
|
||||||
|
disableOsm = changes.disableOsm.newValue;
|
||||||
|
}
|
||||||
|
if ('alwaysProxy' in changes) {
|
||||||
|
alwaysProxy = changes.alwaysProxy.newValue;
|
||||||
|
}
|
||||||
|
if ('onlyEmbeddedVideo' in changes) {
|
||||||
|
onlyEmbeddedVideo = changes.onlyEmbeddedVideo.newValue;
|
||||||
|
}
|
||||||
|
if ('videoQuality' in changes) {
|
||||||
|
videoQuality = changes.videoQuality.newValue;
|
||||||
|
}
|
||||||
|
if ('invidiousDarkMode' in changes) {
|
||||||
|
invidiousDarkMode = changes.invidiousDarkMode.newValue;
|
||||||
|
}
|
||||||
|
if ('invidiousVolume' in changes) {
|
||||||
|
invidiousVolume = changes.invidiousVolume.newValue;
|
||||||
|
}
|
||||||
|
if ('invidiousPlayerStyle' in changes) {
|
||||||
|
invidiousPlayerStyle = changes.invidiousPlayerStyle.newValue;
|
||||||
|
}
|
||||||
|
if ('invidiousSubtitles' in changes) {
|
||||||
|
invidiousSubtitles = changes.invidiousSubtitles.newValue;
|
||||||
|
}
|
||||||
|
if ('invidiousAutoplay' in changes) {
|
||||||
|
invidiousAutoplay = changes.invidiousAutoplay.newValue;
|
||||||
|
}
|
||||||
|
if ('exceptions' in changes) {
|
||||||
|
exceptions = changes.exceptions.newValue.map(e => {
|
||||||
|
return new RegExp(e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function addressToLatLng(address, callback) {
|
||||||
|
const xmlhttp = new XMLHttpRequest();
|
||||||
|
xmlhttp.onreadystatechange = () => {
|
||||||
|
if (xmlhttp.readyState === XMLHttpRequest.DONE) {
|
||||||
|
if (xmlhttp.status === 200) {
|
||||||
|
const json = JSON.parse(xmlhttp.responseText)[0];
|
||||||
|
if (json) {
|
||||||
|
callback(
|
||||||
|
`${json.lat}%2C${json.lon}`,
|
||||||
|
`${json.boundingbox[2]},${json.boundingbox[1]},${json.boundingbox[3]},${json.boundingbox[0]}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.info("Error: Status is " + xmlhttp.status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xmlhttp.open(
|
||||||
|
'GET',
|
||||||
|
`https://nominatim.openstreetmap.org/search/${address}?format=json&limit=1`,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
xmlhttp.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function isException(url, initiator) {
|
||||||
|
return exceptions.some(regex => (regex.test(url.href))) ||
|
||||||
|
(initiator && exceptions.some(regex => (regex.test(initiator.href))));
|
||||||
|
}
|
||||||
|
|
||||||
|
function isFirefox() {
|
||||||
|
return typeof InstallTrigger !== 'undefined';
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectYouTube(url, initiator, type) {
|
||||||
|
if (disableInvidious || isException(url, initiator)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (initiator && (initiator.origin === invidiousInstance || youtubeDomains.includes(initiator.host))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url.pathname.match(/iframe_api/) || url.pathname.match(/www-widgetapi/)) {
|
||||||
|
// Don't redirect YouTube Player API.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url.host.split('.')[0] === 'studio') {
|
||||||
|
// Avoid redirecting `studio.youtube.com`
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (onlyEmbeddedVideo && type !== 'sub_frame') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Apply settings
|
||||||
|
if (alwaysProxy) {
|
||||||
|
url.searchParams.append('local', true);
|
||||||
|
}
|
||||||
|
if (videoQuality) {
|
||||||
|
url.searchParams.append('quality', videoQuality);
|
||||||
|
}
|
||||||
|
if (invidiousDarkMode) {
|
||||||
|
url.searchParams.append('dark_mode', invidiousDarkMode);
|
||||||
|
}
|
||||||
|
if (invidiousVolume) {
|
||||||
|
url.searchParams.append('volume', invidiousVolume);
|
||||||
|
}
|
||||||
|
if (invidiousPlayerStyle) {
|
||||||
|
url.searchParams.append('player_style', invidiousPlayerStyle);
|
||||||
|
}
|
||||||
|
if (invidiousSubtitles) {
|
||||||
|
url.searchParams.append('subtitles', invidiousSubtitles);
|
||||||
|
}
|
||||||
|
url.searchParams.append('autoplay', invidiousAutoplay ? 1 : 0);
|
||||||
|
|
||||||
|
return `${invidiousInstance}${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectTwitter(url, initiator) {
|
||||||
|
if (disableNitter || isException(url, initiator)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url.pathname.includes('/home')) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (isFirefox() && initiator && (initiator.origin === nitterInstance || twitterDomains.includes(initiator.host))) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
redirectBypassFlag: true
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url.host.split('.')[0] === 'pbs') {
|
||||||
|
return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
|
||||||
|
} else if (url.host.split('.')[0] === 'video') {
|
||||||
|
return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
|
||||||
|
} else if (url.pathname.includes('tweets')) {
|
||||||
|
return `${nitterInstance}${url.pathname.replace('/tweets', '')}${url.search}`;
|
||||||
|
} else {
|
||||||
|
return `${nitterInstance}${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectInstagram(url, initiator, type) {
|
||||||
|
if (disableBibliogram || isException(url, initiator)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Do not redirect Bibliogram view on Instagram links
|
||||||
|
if (initiator && (initiator.origin === bibliogramInstance || instagramDomains.includes(initiator.host))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// Do not redirect /accounts, /embeds.js, or anything other than main_frame
|
||||||
|
if (type !== 'main_frame' || url.pathname.match(bibliogramBypassPaths)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (url.pathname === '/' || instagramReservedPaths.includes(url.pathname.split('/')[1])) {
|
||||||
|
return `${bibliogramInstance}${url.pathname}${url.search}`;
|
||||||
|
} else {
|
||||||
|
// Likely a user profile, redirect to '/u/...'
|
||||||
|
return `${bibliogramInstance}/u${url.pathname}${url.search}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirectGoogleMaps(url, initiator) {
|
||||||
|
if (disableOsm || isException(url, initiator)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
let redirect;
|
||||||
|
let mapCentre = '';
|
||||||
|
let params = '';
|
||||||
|
// Set map centre if present
|
||||||
|
if (url.pathname.match(mapCentreRegex)) {
|
||||||
|
const [, lat, lon, zoom] = url.pathname.match(mapCentreRegex);
|
||||||
|
mapCentre = `#map=${zoom}/${lat}/${lon}`;
|
||||||
|
} else if (url.search.includes('center=')) {
|
||||||
|
const [lat, lon] = url.searchParams.get('center').split(',');
|
||||||
|
mapCentre = `#map=${url.searchParams.get('zoom') || '17'}/${lat}/${lon}`;
|
||||||
|
// Set default zoom if mapCentre not present
|
||||||
|
} else {
|
||||||
|
params = '&zoom=17';
|
||||||
|
}
|
||||||
|
// Set map layer
|
||||||
|
params = `${params}&layers=${layers[url.searchParams.get('layer')] || layers['none']}`;
|
||||||
|
// Handle Google Maps Embed API
|
||||||
|
if (url.pathname.includes('/embed')) {
|
||||||
|
let query = '';
|
||||||
|
if (url.searchParams.has('q')) {
|
||||||
|
query = url.searchParams.get('q');
|
||||||
|
} else if (url.searchParams.has('query')) {
|
||||||
|
query = url.searchParams.has('query');
|
||||||
|
} else if (url.searchParams.has('pb')) {
|
||||||
|
try {
|
||||||
|
query = url.searchParams.get('pb').split(/!2s(.*?)!/)[1];
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
// Unable to find map marker in URL.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let marker, bbox;
|
||||||
|
addressToLatLng(query, (coords, boundingbox) => {
|
||||||
|
marker = coords;
|
||||||
|
bbox = boundingbox;
|
||||||
|
});
|
||||||
|
redirect = `${osmInstance}/export/embed.html?bbox=${bbox}&layer=mapnik&marker=${marker}`;
|
||||||
|
// Handle Google Maps Directions
|
||||||
|
} else if (url.pathname.includes('/dir')) {
|
||||||
|
const travelMode = travelModes[url.searchParams.get('travelmode')] || travelModes['driving'];
|
||||||
|
let origin;
|
||||||
|
addressToLatLng(url.searchParams.get('origin'), coords => {
|
||||||
|
origin = coords;
|
||||||
|
});
|
||||||
|
let destination;
|
||||||
|
addressToLatLng(url.searchParams.get('destination'), coords => {
|
||||||
|
destination = coords;
|
||||||
|
});
|
||||||
|
redirect = `${osmInstance}/directions?engine=${travelMode}&route=${origin}%3B${destination}${mapCentre}${params}`;
|
||||||
|
// Get marker from data attribute
|
||||||
|
} else if (url.pathname.includes('data=') && url.pathname.match(dataLatLngRegex)) {
|
||||||
|
const [mlat, mlon] = url.pathname.match(dataLatLngRegex);
|
||||||
|
redirect = `${osmInstance}/?mlat=${mlat.replace('!3d', '')}&mlon=${mlon.replace('!4d', '')}${mapCentre}${params}`;
|
||||||
|
// Get marker from ll param
|
||||||
|
} else if (url.searchParams.has('ll')) {
|
||||||
|
const [mlat, mlon] = url.searchParams.get('ll').split(',');
|
||||||
|
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
|
||||||
|
// Get marker from viewpoint param.
|
||||||
|
} else if (url.searchParams.has('viewpoint')) {
|
||||||
|
const [mlat, mlon] = url.searchParams.get('viewpoint').split(',');
|
||||||
|
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
|
||||||
|
// Use query as search if present.
|
||||||
|
} else {
|
||||||
|
let query;
|
||||||
|
if (url.searchParams.has('q')) {
|
||||||
|
query = url.searchParams.get('q');
|
||||||
|
} else if (url.searchParams.has('query')) {
|
||||||
|
query = url.searchParams.get('query');
|
||||||
|
} else if (url.pathname.match(placeRegex)) {
|
||||||
|
query = url.pathname.match(placeRegex)[1];
|
||||||
|
}
|
||||||
|
redirect = `${osmInstance}/${query ? 'search?query=' + query : ''}${mapCentre || '#'}${params}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
|
details => {
|
||||||
|
const url = new URL(details.url);
|
||||||
|
let initiator;
|
||||||
|
if (details.originUrl) {
|
||||||
|
initiator = new URL(details.originUrl);
|
||||||
|
} else if (details.initiator) {
|
||||||
|
initiator = new URL(details.initiator);
|
||||||
|
}
|
||||||
|
let redirect;
|
||||||
|
if (youtubeDomains.includes(url.host)) {
|
||||||
|
redirect = {
|
||||||
|
redirectUrl: redirectYouTube(url, initiator, details.type)
|
||||||
|
};
|
||||||
|
} else if (twitterDomains.includes(url.host)) {
|
||||||
|
redirect = {
|
||||||
|
redirectUrl: redirectTwitter(url, initiator)
|
||||||
|
};
|
||||||
|
} else if (instagramDomains.includes(url.host)) {
|
||||||
|
redirect = {
|
||||||
|
redirectUrl: redirectInstagram(url, initiator, details.type)
|
||||||
|
};
|
||||||
|
} else if (url.href.match(googleMapsRegex)) {
|
||||||
|
redirect = {
|
||||||
|
redirectUrl: redirectGoogleMaps(url, initiator)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (redirect && redirect.redirectUrl) {
|
||||||
|
console.info(
|
||||||
|
'Redirecting', `"${url.href}"`, '=>', `"${redirect.redirectUrl}"`
|
||||||
|
);
|
||||||
|
console.info('Details', details);
|
||||||
|
}
|
||||||
|
return redirect;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
urls: ["<all_urls>"]
|
||||||
|
},
|
||||||
|
['blocking']
|
||||||
|
);
|
||||||
|
|
||||||
|
browser.runtime.onInstalled.addListener(
|
||||||
|
details => {
|
||||||
|
if (details.reason === 'install') {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
bibliogramInstance: bibliogramInstances[~~(bibliogramInstances.length * Math.random())]
|
||||||
|
});
|
||||||
|
} else if (details.reason === 'update') {
|
||||||
|
browser.storage.sync.get(['whitelist', 'exceptions'],
|
||||||
|
result => {
|
||||||
|
if (result.whitelist) {
|
||||||
|
let whitelist = result.whitelist.map(
|
||||||
|
e => e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||||
|
);
|
||||||
|
browser.storage.sync.set({
|
||||||
|
exceptions: result.exceptions.concat(whitelist),
|
||||||
|
whitelist: null
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "__MSG_extensionName__",
|
"name": "__MSG_extensionName__",
|
||||||
"description": "__MSG_extensionDescription__",
|
"description": "__MSG_extensionDescription__",
|
||||||
"version": "1.1.49",
|
"version": "1.1.36",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"background": {
|
"background": {
|
||||||
"page": "pages/background/background.html",
|
"scripts": [
|
||||||
|
"background.js"
|
||||||
|
],
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
|
@ -14,7 +16,12 @@
|
||||||
"48": "assets/images/icon48.png",
|
"48": "assets/images/icon48.png",
|
||||||
"128": "assets/images/icon128.png"
|
"128": "assets/images/icon128.png"
|
||||||
},
|
},
|
||||||
"permissions": ["storage", "webRequest", "webRequestBlocking", "<all_urls>"],
|
"permissions": [
|
||||||
|
"storage",
|
||||||
|
"webRequest",
|
||||||
|
"webRequestBlocking",
|
||||||
|
"<all_urls>"
|
||||||
|
],
|
||||||
"browser_action": {
|
"browser_action": {
|
||||||
"default_title": "Privacy Redirect",
|
"default_title": "Privacy Redirect",
|
||||||
"default_popup": "pages/popup/popup.html",
|
"default_popup": "pages/popup/popup.html",
|
||||||
|
@ -34,35 +41,32 @@
|
||||||
"*://pbs.twimg.com/*",
|
"*://pbs.twimg.com/*",
|
||||||
"*://video.twimg.com/*"
|
"*://video.twimg.com/*"
|
||||||
],
|
],
|
||||||
"js": ["assets/javascripts/remove-twitter-sw.js"],
|
"js": [
|
||||||
|
"assets/javascript/remove-twitter-sw.js"
|
||||||
|
],
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matches": [
|
"matches": [
|
||||||
|
"*://invidio.us/*",
|
||||||
|
"*://invidio.us/*",
|
||||||
"*://invidious.snopyta.org/*",
|
"*://invidious.snopyta.org/*",
|
||||||
"*://invidious.xyz/*",
|
"*://invidiou.sh/*",
|
||||||
"*://invidious.kavin.rocks/*",
|
|
||||||
"*://tube.connect.cafe/*",
|
|
||||||
"*://invidious.zapashcanon.fr/*",
|
|
||||||
"*://invidiou.site/*",
|
|
||||||
"*://vid.mint.lgbt/*",
|
|
||||||
"*://invidious.site/*",
|
|
||||||
"*://yewtu.be/*",
|
"*://yewtu.be/*",
|
||||||
"*://invidious.tube/*",
|
"*://yt.maisputain.ovh/*",
|
||||||
"*://invidious.silkky.cloud/*",
|
"*://invidious.toot.koeln/*",
|
||||||
"*://invidious.himiko.cloud/*",
|
"*://invidious.ggc-project.de/*",
|
||||||
"*://inv.skyn3t.in/*",
|
"*://invidious.toot.koeln/*",
|
||||||
"*://tube.incognet.io/*",
|
"*://kgg2m7yk5aybusll.onion/*",
|
||||||
"*://invidious.tinfoil-hat.net/*",
|
"*://axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion/*",
|
||||||
"*://invidious.namazso.eu/*",
|
|
||||||
"*://vid.puffyan.us/*",
|
|
||||||
"*://dev.viewtube.io/*",
|
|
||||||
"*://invidious.048596.xyz/*",
|
|
||||||
"*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*",
|
"*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*",
|
||||||
|
"*://qklhadlycap4cnod.onion/*",
|
||||||
"*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*",
|
"*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*",
|
||||||
"*://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion/*"
|
"*://mfqczy4mysscub2s.onio/*n"
|
||||||
|
],
|
||||||
|
"js": [
|
||||||
|
"assets/javascript/persist-invidious-prefs.js"
|
||||||
],
|
],
|
||||||
"js": ["assets/javascripts/persist-invidious-prefs.js"],
|
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -70,11 +74,9 @@
|
||||||
"page": "pages/options/options.html",
|
"page": "pages/options/options.html",
|
||||||
"open_in_tab": false
|
"open_in_tab": false
|
||||||
},
|
},
|
||||||
"web_accessible_resources": ["assets/javascripts/helpers/*"],
|
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}",
|
"id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}"
|
||||||
"strict_min_version": "67.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
25
package.json
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
"name": "privacy-redirect",
|
|
||||||
"description": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.0.0",
|
|
||||||
"npm": ">=5.6.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "web-ext build --overwrite-dest --source-dir ./src/",
|
|
||||||
"test": "web-ext lint --source-dir ./src/ || true"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/SimonBrazell/privacy-redirect.git"
|
|
||||||
},
|
|
||||||
"author": "SimonBrazell",
|
|
||||||
"license": "GPL-3.0-only",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/SimonBrazell/privacy-redirect/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/SimonBrazell/privacy-redirect#readme",
|
|
||||||
"devDependencies": {
|
|
||||||
"web-ext": "^6.2.0"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,286 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title></title>
|
||||||
|
<link href="../styles.css" rel="stylesheet">
|
||||||
|
<title>Privacy Redirect Options</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<button class="tablinks" id="general-tab" data-localize="__MSG_generalTab__">General</button>
|
||||||
|
<button class="tablinks" id="advanced-tab" data-localize="__MSG_advancedTab__">Advanced</button>
|
||||||
|
<button class="tablinks" id="exceptions-tab" data-localize="__MSG_exceptionsTab__">Exceptions</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="general" class="tabcontent">
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Nitter redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableNitter__">Nitter Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-nitter" type="checkbox" checked>
|
||||||
|
<label for="disable-nitter" class="checkbox-label"></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Invidious redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableInvidious__">Invidious Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-invidious" type="checkbox" checked>
|
||||||
|
<label for="disable-invidious" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Bibliogram redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableBibliogram__">Bibliogram Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-bibliogram" type="checkbox" checked>
|
||||||
|
<label for="disable-bibliogram" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle OpenStreetMap redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableOsm__">OpenStreetMap Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-osm" type="checkbox" checked>
|
||||||
|
<label for="disable-osm" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_nitterInstance__">Nitter Instance</h1>
|
||||||
|
<div class="autocomplete">
|
||||||
|
<input id="nitter-instance" type="url" name="nitter-instance" placeholder="https://nitter.net">
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_invidiousInstance__">Invidious Instance</h1>
|
||||||
|
<div class="autocomplete">
|
||||||
|
<input id="invidious-instance" type="url" placeholder="https://invidio.us">
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_bibliogramInstance__">Bibliogram Instance</h1>
|
||||||
|
<div class="autocomplete">
|
||||||
|
<input id="bibliogram-instance" type="url" placeholder="https://bibliogram.art">
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<sections class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_osmInstance__">OpenStreetMap Instance</h1>
|
||||||
|
<div class="autocomplete">
|
||||||
|
<input id="osm-instance" type="url" placeholder="https://openstreetmap.org">
|
||||||
|
</div>
|
||||||
|
</sections>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="advanced" class="tabcontent">
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Always proxy videos through Invidious">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_alwaysProxy__">Always proxy videos through Invidious</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="always-proxy" type="checkbox" checked>
|
||||||
|
<label for="always-proxy" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Only redirect embedded video to Invidious">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_onlyEmbeddedVideo__">Only redirect embedded video to Invidious</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="only-embed" type="checkbox" checked>
|
||||||
|
<label for="only-embed" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_videoQuality__">Invidious Video Quality</h1>
|
||||||
|
<select id="video-quality">
|
||||||
|
<option value="">Default</option>
|
||||||
|
<option value="hd720">720p</option>
|
||||||
|
<option value="medium">480p</option>
|
||||||
|
<option value="dash">DASH (Dynamic Adaptive Streaming over HTTP)</option>
|
||||||
|
</select>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Invidious dark mode aways on">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_invidiousDarkMode__">Invidious dark mode always on</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="invidious-dark-mode" type="checkbox" checked>
|
||||||
|
<label for="invidious-dark-mode" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_invidiousVolume__">Invidious Volume</h1>
|
||||||
|
<input id="invidious-volume" name="invidious-volume" type="range" min="0" max="100" step="1">
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_invidiousPlayerStyle__">Invidious Player Style</h1>
|
||||||
|
<select id="invidious-player-style">
|
||||||
|
<option value="">Invidious</option>
|
||||||
|
<option value="youtube">YouTube</option>
|
||||||
|
</select>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<h1 data-localize="__MSG_invidiousSubtitles__">Invidious Subtitles - language codes (comma-separated)</h1>
|
||||||
|
<input id="invidious-subtitles" name="invidious-subtitles" type="text">
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Invidious automatically play video on load">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_invidiousAutoplay__">Invidious automatically play video on load</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="invidious-autoplay" type="checkbox" checked>
|
||||||
|
<label for="invidious-autoplay" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Persist Invidious preferences">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_persistInvidiousPrefs__">Persist Invidious preferences (as cookie)</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="persist-invidious-prefs" type="checkbox" checked>
|
||||||
|
<label for="persist-invidious-prefs" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Proactively remove Twitter service worker">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_removeTwitterSW__">Proactively remove Twitter service worker</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="remove-twitter-sw" type="checkbox" checked>
|
||||||
|
<label for="remove-twitter-sw" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="exceptions" class="tabcontent">
|
||||||
|
<section class="settings-block" data-localize="__MSG_exceptionsDescription__">
|
||||||
|
<p>
|
||||||
|
Enter a URL or Regular Expression to be excluded from redirects.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
All requests for or initiating from a URL that matches your exception
|
||||||
|
will be excluded from redirects.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Note -</b> Supports JavaScript regular expressions, excluding
|
||||||
|
the enclosing forward slashes.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="exceptions option">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_addException__">Add Exception</h1>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input id="new-exceptions-item" type="text" placeholder="URL or RegExp">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="radio" id="url" name="type" value="URL" checked>
|
||||||
|
<label class="radio" for="url">URL</label>
|
||||||
|
<input type="radio" id="regExp" name="type" value="RegExp">
|
||||||
|
<label class="radio" for="regExp">RegExp</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button id="add-to-exceptions">
|
||||||
|
<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'>
|
||||||
|
<line x1='256' y1='112' x2='256' y2='400'
|
||||||
|
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
<line x1='400' y1='256' x2='112' y2='256'
|
||||||
|
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
<ul id="exceptions-items"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="./options.js"></script>
|
||||||
|
<script src="../../assets/javascript/localise.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,416 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const nitterInstances = [
|
||||||
|
'https://nitter.net',
|
||||||
|
'https://nitter.snopyta.org',
|
||||||
|
'https://nitter.42l.fr',
|
||||||
|
'https://nitter.nixnet.services',
|
||||||
|
'https://nitter.13ad.de',
|
||||||
|
'https://nitter.pussthecat.org',
|
||||||
|
'https://nitter.mastodont.cat',
|
||||||
|
'https://nitter.dark.fail',
|
||||||
|
'https://nitter.tedomum.net',
|
||||||
|
'https://t.maisputain.ovh',
|
||||||
|
'http://3nzoldnxplag42gqjs23xvghtzf6t6yzssrtytnntc6ppc7xxuoneoad.onion',
|
||||||
|
'http://nitter.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion'
|
||||||
|
];
|
||||||
|
const invidiousInstances = [
|
||||||
|
'https://invidio.us',
|
||||||
|
'https://invidious.snopyta.org',
|
||||||
|
'https://invidious.fdn.fr',
|
||||||
|
'https://invidious.13ad.de',
|
||||||
|
'https://watch.nettohikari.com',
|
||||||
|
'https://yewtu.be',
|
||||||
|
'https://yt.maisputain.ovh',
|
||||||
|
'https://invidious.toot.koeln',
|
||||||
|
'https://invidious.ggc-project.de',
|
||||||
|
'http://kgg2m7yk5aybusll.onion',
|
||||||
|
'http://axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion',
|
||||||
|
'http://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion',
|
||||||
|
'http://qklhadlycap4cnod.onion',
|
||||||
|
'http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion',
|
||||||
|
'http://mfqczy4mysscub2s.onion'
|
||||||
|
];
|
||||||
|
const bibliogramInstances = [
|
||||||
|
'https://bibliogram.art',
|
||||||
|
'https://bibliogram.snopyta.org',
|
||||||
|
'https://bibliogram.pussthecat.org',
|
||||||
|
'https://bibliogram.nixnet.services',
|
||||||
|
'https://bibliogram.hamster.dance',
|
||||||
|
'https://insta.maisputain.ovh',
|
||||||
|
'https://bibliogram.ggc-project.de'
|
||||||
|
];
|
||||||
|
const osmInstances = [
|
||||||
|
'https://openstreetmap.org'
|
||||||
|
];
|
||||||
|
const autocompletes = [
|
||||||
|
{ id: 'nitter-instance', instances: nitterInstances },
|
||||||
|
{ id: 'invidious-instance', instances: invidiousInstances },
|
||||||
|
{ id: 'bibliogram-instance', instances: bibliogramInstances },
|
||||||
|
{ id: 'osm-instance', instances: osmInstances }
|
||||||
|
];
|
||||||
|
|
||||||
|
let nitterInstance = document.getElementById('nitter-instance');
|
||||||
|
let invidiousInstance = document.getElementById('invidious-instance');
|
||||||
|
let bibliogramInstance = document.getElementById('bibliogram-instance');
|
||||||
|
let osmInstance = document.getElementById('osm-instance');
|
||||||
|
let disableNitter = document.getElementById('disable-nitter');
|
||||||
|
let disableInvidious = document.getElementById('disable-invidious');
|
||||||
|
let disableBibliogram = document.getElementById('disable-bibliogram');
|
||||||
|
let disableOsm = document.getElementById('disable-osm');
|
||||||
|
let alwaysProxy = document.getElementById('always-proxy');
|
||||||
|
let onlyEmbeddedVideo = document.getElementById('only-embed');
|
||||||
|
let videoQuality = document.getElementById('video-quality');
|
||||||
|
let removeTwitterSW = document.getElementById('remove-twitter-sw');
|
||||||
|
let invidiousDarkMode = document.getElementById('invidious-dark-mode');
|
||||||
|
let persistInvidiousPrefs = document.getElementById('persist-invidious-prefs');
|
||||||
|
let invidiousVolume = document.getElementById('invidious-volume');
|
||||||
|
let invidiousPlayerStyle = document.getElementById('invidious-player-style');
|
||||||
|
let invidiousSubtitles = document.getElementById('invidious-subtitles');
|
||||||
|
let invidiousAutoplay = document.getElementById('invidious-autoplay');
|
||||||
|
let exceptions;
|
||||||
|
|
||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
function prependExceptionsItem(item, index) {
|
||||||
|
const li = document.createElement('li');
|
||||||
|
li.appendChild(document.createTextNode(item.toString()));
|
||||||
|
const button = document.createElement('button');
|
||||||
|
li.appendChild(button);
|
||||||
|
document.getElementById('exceptions-items').prepend(li);
|
||||||
|
const svg =
|
||||||
|
`<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 512 512'>
|
||||||
|
<line x1='368' y1='368' x2='144' y2='144'
|
||||||
|
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
<line x1='368' y1='144' x2='144' y2='368'
|
||||||
|
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
</svg>`;
|
||||||
|
button.innerHTML = svg;
|
||||||
|
button.addEventListener('click', () => {
|
||||||
|
exceptions.splice(index, 1);
|
||||||
|
browser.storage.sync.set({
|
||||||
|
exceptions: exceptions
|
||||||
|
});
|
||||||
|
li.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
browser.storage.sync.get(
|
||||||
|
[
|
||||||
|
'nitterInstance',
|
||||||
|
'invidiousInstance',
|
||||||
|
'bibliogramInstance',
|
||||||
|
'osmInstance',
|
||||||
|
'disableNitter',
|
||||||
|
'disableInvidious',
|
||||||
|
'disableBibliogram',
|
||||||
|
'disableOsm',
|
||||||
|
'alwaysProxy',
|
||||||
|
'onlyEmbeddedVideo',
|
||||||
|
'videoQuality',
|
||||||
|
'removeTwitterSW',
|
||||||
|
'invidiousDarkMode',
|
||||||
|
'persistInvidiousPrefs',
|
||||||
|
'invidiousVolume',
|
||||||
|
'invidiousPlayerStyle',
|
||||||
|
'invidiousSubtitles',
|
||||||
|
'invidiousAutoplay',
|
||||||
|
'exceptions'
|
||||||
|
],
|
||||||
|
result => {
|
||||||
|
nitterInstance.value = result.nitterInstance || '';
|
||||||
|
invidiousInstance.value = result.invidiousInstance || '';
|
||||||
|
bibliogramInstance.value = result.bibliogramInstance || '';
|
||||||
|
osmInstance.value = result.osmInstance || '';
|
||||||
|
disableNitter.checked = !result.disableNitter;
|
||||||
|
disableInvidious.checked = !result.disableInvidious;
|
||||||
|
disableBibliogram.checked = !result.disableBibliogram;
|
||||||
|
disableOsm.checked = !result.disableOsm;
|
||||||
|
alwaysProxy.checked = result.alwaysProxy;
|
||||||
|
onlyEmbeddedVideo.checked = result.onlyEmbeddedVideo;
|
||||||
|
videoQuality.value = result.videoQuality || '';
|
||||||
|
removeTwitterSW.checked = !result.removeTwitterSW;
|
||||||
|
invidiousDarkMode.checked = result.invidiousDarkMode;
|
||||||
|
persistInvidiousPrefs.checked = result.persistInvidiousPrefs;
|
||||||
|
exceptions = result.exceptions || [];
|
||||||
|
exceptions.forEach(prependExceptionsItem);
|
||||||
|
invidiousVolume.value = result.invidiousVolume;
|
||||||
|
invidiousPlayerStyle.value = result.invidiousPlayerStyle;
|
||||||
|
invidiousSubtitles.value = result.invidiousSubtitles || '';
|
||||||
|
invidiousAutoplay.checked = !result.invidiousAutoplay;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
function openTab(tab, event) {
|
||||||
|
let i, tabcontent, tablinks;
|
||||||
|
tabcontent = document.getElementsByClassName('tabcontent');
|
||||||
|
for (i = 0; i < tabcontent.length; i++) {
|
||||||
|
tabcontent[i].style.display = 'none';
|
||||||
|
}
|
||||||
|
tablinks = document.getElementsByClassName('tablinks');
|
||||||
|
for (i = 0; i < tablinks.length; i++) {
|
||||||
|
tablinks[i].className = tablinks[i].className.replace(' active', '');
|
||||||
|
}
|
||||||
|
document.getElementById(tab).style.display = 'block';
|
||||||
|
event.currentTarget.className += ' active';
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('general-tab').addEventListener(
|
||||||
|
'click', openTab.bind(null, 'general')
|
||||||
|
);
|
||||||
|
document.getElementById('advanced-tab').addEventListener(
|
||||||
|
'click', openTab.bind(null, 'advanced')
|
||||||
|
);
|
||||||
|
document.getElementById('exceptions-tab').addEventListener(
|
||||||
|
'click', openTab.bind(null, 'exceptions')
|
||||||
|
);
|
||||||
|
|
||||||
|
document.getElementById('general-tab').click();
|
||||||
|
|
||||||
|
function addToExceptions() {
|
||||||
|
const input = document.getElementById('new-exceptions-item');
|
||||||
|
const type = document.querySelector('input[name="type"]:checked').value;
|
||||||
|
if (input.value) {
|
||||||
|
try {
|
||||||
|
let value = input.value;
|
||||||
|
new RegExp(input.value);
|
||||||
|
if (type === 'URL') {
|
||||||
|
value = value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||||
|
}
|
||||||
|
exceptions.push(value);
|
||||||
|
browser.storage.sync.set({
|
||||||
|
exceptions: exceptions
|
||||||
|
});
|
||||||
|
prependExceptionsItem(value, exceptions.indexOf(value));
|
||||||
|
input.value = '';
|
||||||
|
} catch (error) {
|
||||||
|
input.setCustomValidity('Invalid RegExp');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.setCustomValidity('Invalid RegExp');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('add-to-exceptions').addEventListener(
|
||||||
|
'click', addToExceptions
|
||||||
|
);
|
||||||
|
|
||||||
|
function debounce(func, wait, immediate) {
|
||||||
|
let timeout;
|
||||||
|
return () => {
|
||||||
|
let context = this, args = arguments;
|
||||||
|
let later = () => {
|
||||||
|
timeout = null;
|
||||||
|
if (!immediate) func.apply(context, args);
|
||||||
|
};
|
||||||
|
let callNow = immediate && !timeout;
|
||||||
|
clearTimeout(timeout);
|
||||||
|
timeout = setTimeout(later, wait);
|
||||||
|
if (callNow) func.apply(context, args);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
function parseURL(urlString) {
|
||||||
|
if (urlString) {
|
||||||
|
try {
|
||||||
|
const url = new URL(urlString);
|
||||||
|
if (url.username && url.password) {
|
||||||
|
return `${url.protocol}//${url.username}:${url.password}@${url.host}`
|
||||||
|
} else {
|
||||||
|
return url.origin;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let nitterInstanceChange = debounce(() => {
|
||||||
|
if (nitterInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
nitterInstance: parseURL(nitterInstance.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
nitterInstance.addEventListener('input', nitterInstanceChange);
|
||||||
|
|
||||||
|
let invidiousInstanceChange = debounce(() => {
|
||||||
|
if (invidiousInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
invidiousInstance: parseURL(invidiousInstance.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
invidiousInstance.addEventListener('input', invidiousInstanceChange);
|
||||||
|
|
||||||
|
let bibliogramInstanceChange = debounce(() => {
|
||||||
|
if (bibliogramInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
bibliogramInstance: parseURL(bibliogramInstance.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
bibliogramInstance.addEventListener('input', bibliogramInstanceChange);
|
||||||
|
|
||||||
|
let osmInstanceChange = debounce(() => {
|
||||||
|
if (osmInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
osmInstance: parseURL(osmInstance.value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
osmInstance.addEventListener('input', osmInstanceChange);
|
||||||
|
|
||||||
|
disableNitter.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableNitter: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableInvidious.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableInvidious: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableBibliogram.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableBibliogram: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableOsm.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableOsm: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
alwaysProxy.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ alwaysProxy: event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
onlyEmbeddedVideo.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ onlyEmbeddedVideo: event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
videoQuality.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
videoQuality: event.target.options[videoQuality.selectedIndex].value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
removeTwitterSW.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ removeTwitterSW: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
invidiousDarkMode.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ invidiousDarkMode: event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
persistInvidiousPrefs.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ persistInvidiousPrefs: event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
let invidiousVolumeChange = debounce(() => {
|
||||||
|
if (invidiousInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
invidiousVolume: invidiousVolume.value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
invidiousVolume.addEventListener('input', invidiousVolumeChange);
|
||||||
|
|
||||||
|
invidiousPlayerStyle.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
invidiousPlayerStyle: event.target.options[invidiousPlayerStyle.selectedIndex].value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
let invidiousSubtitlesChange = debounce(() => {
|
||||||
|
if (invidiousInstance.checkValidity()) {
|
||||||
|
browser.storage.sync.set({
|
||||||
|
invidiousSubtitles: invidiousSubtitles.value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
invidiousSubtitles.addEventListener('input', invidiousSubtitlesChange);
|
||||||
|
|
||||||
|
invidiousAutoplay.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ invidiousAutoplay: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function autocomplete(input, list) {
|
||||||
|
let currentFocus;
|
||||||
|
input.addEventListener("focus", (e) => {
|
||||||
|
showOptions(e);
|
||||||
|
});
|
||||||
|
input.addEventListener("input", (e) => {
|
||||||
|
const val = e.target.value;
|
||||||
|
if (!val) { return false; }
|
||||||
|
currentFocus = -1;
|
||||||
|
showOptions(e);
|
||||||
|
});
|
||||||
|
input.addEventListener("keydown", function (e) {
|
||||||
|
let x = document.getElementById(this.id + "autocomplete-list");
|
||||||
|
if (x) x = x.getElementsByTagName("div");
|
||||||
|
if (e.keyCode == 40) {
|
||||||
|
currentFocus++;
|
||||||
|
addActive(x);
|
||||||
|
} else if (e.keyCode == 38) {
|
||||||
|
currentFocus--;
|
||||||
|
addActive(x);
|
||||||
|
} else if (e.keyCode == 13) {
|
||||||
|
e.preventDefault();
|
||||||
|
if (currentFocus > -1) {
|
||||||
|
if (x) x[currentFocus].click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function showOptions(e) {
|
||||||
|
let a, b, i, val = e.target.value;
|
||||||
|
closeAllLists();
|
||||||
|
a = document.createElement("div");
|
||||||
|
a.setAttribute("id", e.target.id + "autocomplete-list");
|
||||||
|
a.setAttribute("class", "autocomplete-items");
|
||||||
|
e.target.parentNode.appendChild(a);
|
||||||
|
for (i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].toLowerCase().indexOf(val.toLowerCase()) > -1) {
|
||||||
|
b = document.createElement("div");
|
||||||
|
b.innerHTML = "<strong>" + list[i].substr(0, val.length) + "</strong>";
|
||||||
|
b.innerHTML += list[i].substr(val.length);
|
||||||
|
b.innerHTML += "<input type='hidden' value='" + list[i] + "'>";
|
||||||
|
b.addEventListener("click", function (e) {
|
||||||
|
input.value = e.target.getElementsByTagName("input")[0].value;
|
||||||
|
input.dispatchEvent(new Event('input'));
|
||||||
|
closeAllLists();
|
||||||
|
});
|
||||||
|
a.appendChild(b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function addActive(x) {
|
||||||
|
if (!x) return false;
|
||||||
|
removeActive(x);
|
||||||
|
if (currentFocus >= x.length) currentFocus = 0;
|
||||||
|
if (currentFocus < 0) currentFocus = (x.length - 1);
|
||||||
|
x[currentFocus].classList.add("autocomplete-active");
|
||||||
|
}
|
||||||
|
function removeActive(x) {
|
||||||
|
for (let i = 0; i < x.length; i++) {
|
||||||
|
x[i].classList.remove("autocomplete-active");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function closeAllLists(elmnt) {
|
||||||
|
let x = document.getElementsByClassName("autocomplete-items");
|
||||||
|
for (let i = 0; i < x.length; i++) {
|
||||||
|
if (elmnt != x[i] && elmnt != input) {
|
||||||
|
x[i].parentNode.removeChild(x[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.addEventListener("click", (e) => {
|
||||||
|
if (!autocompletes.find(element => element.id === e.target.id)) {
|
||||||
|
closeAllLists(e.target);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
autocompletes.forEach((value) => {
|
||||||
|
autocomplete(document.getElementById(value.id), value.instances);
|
||||||
|
})
|
|
@ -0,0 +1,111 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title></title>
|
||||||
|
<link href="../styles.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="popup">
|
||||||
|
<header>
|
||||||
|
<div class="logo-container">
|
||||||
|
<img src="../../assets/images/icon128.png" alt="Privacy Redirect logo">
|
||||||
|
<h1><span data-localize="__MSG_privacy__" class="privacy">Privacy</span><br><span
|
||||||
|
data-localize="__MSG_redirect__">Redirect</span></h1>
|
||||||
|
</div>
|
||||||
|
<div class="version">
|
||||||
|
<span>Version: <span id="version"></span></span>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Nitter redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableNitter__">Nitter Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-nitter" type="checkbox" checked>
|
||||||
|
<label for="disable-nitter" class="checkbox-label"></label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Invidious redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableInvidious__">Invidious Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-invidious" type="checkbox" checked>
|
||||||
|
<label for="disable-invidious" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle Bibliogram redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableBibliogram__">Bibliogram Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-bibliogram" type="checkbox" checked>
|
||||||
|
<label for="disable-bibliogram" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="settings-block">
|
||||||
|
<table class="option" aria-label="Toggle OpenStreetMap redirects">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<h1 data-localize="__MSG_disableOsm__">OpenStreetMap Redirects</h1>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input aria-hidden="true" id="disable-osm" type="checkbox" checked>
|
||||||
|
<label for="disable-osm" class="checkbox-label">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="settings-block">
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a class="button" id="more-options">
|
||||||
|
<span data-localize="__MSG_moreOptions__">More Options </span>
|
||||||
|
<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'>
|
||||||
|
<path d='M384,224V408a40,40,0,0,1-40,40H104a40,40,0,0,1-40-40V168a40,40,0,0,1,40-40H271.48'
|
||||||
|
style='fill:none;stroke:inherit;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
<polyline points='336 64 448 64 448 176'
|
||||||
|
style='fill:none;stroke:inherit;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
<line x1='224' y1='288' x2='440' y2='72'
|
||||||
|
style='fill:none;stroke:inherit;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="./popup.js"></script>
|
||||||
|
<script src="../../assets/javascript/localise.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,46 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
let disableNitter = document.querySelector('#disable-nitter');
|
||||||
|
let disableInvidious = document.querySelector('#disable-invidious');
|
||||||
|
let disableBibliogram = document.querySelector('#disable-bibliogram');
|
||||||
|
let disableOsm = document.querySelector('#disable-osm');
|
||||||
|
let version = document.querySelector('#version');
|
||||||
|
|
||||||
|
window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
|
browser.storage.sync.get(
|
||||||
|
[
|
||||||
|
'disableNitter',
|
||||||
|
'disableInvidious',
|
||||||
|
'disableBibliogram',
|
||||||
|
'disableOsm'
|
||||||
|
],
|
||||||
|
result => {
|
||||||
|
disableNitter.checked = !result.disableNitter;
|
||||||
|
disableInvidious.checked = !result.disableInvidious;
|
||||||
|
disableBibliogram.checked = !result.disableBibliogram;
|
||||||
|
disableOsm.checked = !result.disableOsm;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
version.textContent = browser.runtime.getManifest().version;
|
||||||
|
|
||||||
|
disableNitter.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableNitter: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableInvidious.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableInvidious: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableBibliogram.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableBibliogram: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
disableOsm.addEventListener('change', event => {
|
||||||
|
browser.storage.sync.set({ disableOsm: !event.target.checked });
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('#more-options').addEventListener('click', () => {
|
||||||
|
browser.runtime.openOptionsPage();
|
||||||
|
});
|
|
@ -1,41 +1,31 @@
|
||||||
body {
|
:root {
|
||||||
--text: #fff;
|
--text-main: #FFF;
|
||||||
--bg-main: #3c4043;
|
--text-secondary: #000;
|
||||||
--bg-secondary: #292a2d;
|
--dark: #3C4043;
|
||||||
--active: #ff5b56;
|
--darker: #292A2D;
|
||||||
|
--light: #E3E7EA;
|
||||||
|
--lighter: #FFF;
|
||||||
|
--active: #FF5B56;
|
||||||
--space: 5px;
|
--space: 5px;
|
||||||
--danger: #f04141;
|
--danger: #f04141;
|
||||||
--danger-light: #f9d0d5;
|
--danger-light: #F9D0D5;
|
||||||
--dark-grey: #767676;
|
|
||||||
--light-grey: #c3c3c3;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.light-theme {
|
|
||||||
--text: #000;
|
|
||||||
--bg-main: #e3e7ea;
|
|
||||||
--bg-secondary: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light-theme.popup,
|
|
||||||
.light-theme .popup {
|
|
||||||
background-color: var(--bg-secondary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
color: var(--text-secondary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
min-height: 572px;
|
min-height: 572px;
|
||||||
font-family: Sans-Serif;
|
font-family: Sans-Serif;
|
||||||
background-color: var(--bg-secondary);
|
background-color: var(--darker);
|
||||||
color: var(--text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup {
|
.popup {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: var(--bg-main);
|
background-color: var(--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -45,8 +35,8 @@ input {
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
background-color: var(--bg-main);
|
background-color: var(--lighter);
|
||||||
color: var(--text);
|
color: var(--text-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: var(--space);
|
padding: var(--space);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +95,7 @@ h3 {
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2 {
|
h2 {
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
@ -116,32 +106,29 @@ footer a.button {
|
||||||
margin: var(--space);
|
margin: var(--space);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="url"],
|
/* Elements */
|
||||||
input[type="text"],
|
|
||||||
select {
|
input[type=url], input[type=text], select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-bottom: var(--space);
|
margin-bottom: var(--space);
|
||||||
background-color: var(--bg-main);
|
|
||||||
border-style: inset;
|
|
||||||
color: var(--text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="url"] {
|
input[type=url] {
|
||||||
padding: 1px 2px;
|
padding: 1px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"] {
|
input[type=checkbox] {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="radio"] {
|
input[type=radio] {
|
||||||
appearance: radio;
|
appearance: radio;
|
||||||
-moz-appearance: radio;
|
-moz-appearance: radio;
|
||||||
-webkit-appearance: radio;
|
-webkit-appearance: radio;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="radio"]:checked + label {
|
input[type=radio]:checked+label {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +136,7 @@ input[type="radio"]:checked + label {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
background: grey;
|
background: grey;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -161,21 +148,20 @@ input[type="radio"]:checked + label {
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-label:after {
|
.checkbox-label:after {
|
||||||
background: white;
|
background: var(--text-main);
|
||||||
border-radius: 90px;
|
border-radius: 90px;
|
||||||
content: "";
|
content: '';
|
||||||
height: 20px;
|
height: 20px;
|
||||||
left: var(--space);
|
left: var(--space);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--space);
|
top: var(--space);
|
||||||
transition: 0.3s;
|
transition: 0.3s; /* Acts on transform below */
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked+label {
|
input:checked+label {
|
||||||
background: var(--active);
|
background: var(--active);
|
||||||
}
|
}
|
||||||
|
/* position when active*/
|
||||||
input:checked+label:after {
|
input:checked+label:after {
|
||||||
left: calc(100% - var(--space));
|
left: calc(100% - var(--space));
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
|
@ -192,8 +178,8 @@ input:checked + label:after {
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
border: var(--active) solid 1px;
|
border: var(--active) solid 1px;
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
stroke: var(--text);
|
stroke: var(--text-main);
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -212,13 +198,13 @@ input:checked + label:after {
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
background-color: var(--active);
|
background-color: var(--active);
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
stroke: var(--text);
|
stroke: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:active {
|
.button:active {
|
||||||
background-color: var(--active);
|
background-color: var(--active);
|
||||||
box-shadow: 0 var(--space) var(--bg-main);
|
box-shadow: 0 var(--space) var(--dark);
|
||||||
transform: translateY(4px);
|
transform: translateY(4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,17 +220,13 @@ input:invalid {
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: var(--bg-secondary);
|
background-color: var(--darker);
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
width: 400px;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab button {
|
.tab button {
|
||||||
border-top-left-radius: 10px;
|
border-top-left-radius: 10px;
|
||||||
border-top-right-radius: 10px;
|
border-top-right-radius: 10px;
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
float: left;
|
float: left;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -252,7 +234,7 @@ input:invalid {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 14px 16px;
|
padding: 14px 16px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
border: solid 1px var(--bg-main);
|
border: solid 1px var(--dark);
|
||||||
width: 33.333%;
|
width: 33.333%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
@ -262,13 +244,13 @@ input:invalid {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab button.active {
|
.tab button.active {
|
||||||
background-color: var(--bg-main);
|
background-color: var(--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabcontent {
|
.tabcontent {
|
||||||
padding-top: 50px;
|
padding-top: 10px;
|
||||||
display: none;
|
display: none;
|
||||||
background-color: var(--bg-main);
|
background-color: var(--dark);
|
||||||
min-height: 510px;
|
min-height: 510px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +267,7 @@ div.exceptions > input {
|
||||||
float: right;
|
float: right;
|
||||||
border: var(--active) solid 1px;
|
border: var(--active) solid 1px;
|
||||||
background-color: var(--active);
|
background-color: var(--active);
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
@ -301,12 +283,12 @@ div.exceptions > input {
|
||||||
ul {
|
ul {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
margin: 20px 20px 0 20px;
|
margin: 20px 20px 0 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
border-bottom: solid 0.5px var(--bg-secondary);
|
border-bottom: solid 0.5px var(--darker);
|
||||||
padding: 20px 0px 20px 20px;
|
padding: 20px 0px 20px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +297,7 @@ li {
|
||||||
margin-right: -5px;
|
margin-right: -5px;
|
||||||
border: var(--active) solid 1px;
|
border: var(--active) solid 1px;
|
||||||
background-color: var(--active);
|
background-color: var(--active);
|
||||||
color: var(--text);
|
color: var(--text-main);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
@ -334,30 +316,27 @@ li {
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete input {
|
.autocomplete input {
|
||||||
background: url(../images/chevron-down.svg) right no-repeat;
|
background: url(../assets/images/chevron-down.svg) right no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-items {
|
.autocomplete-items {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 1px solid var(--bg-main);
|
border: 1px solid var(--dark);
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
top: 85%;
|
top: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
overflow-y: auto;
|
overflow: auto;
|
||||||
max-height: 175px;
|
max-height: 175px;
|
||||||
color: var(--text);
|
|
||||||
overflow-x: hidden;
|
|
||||||
max-width: 380px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-items div {
|
.autocomplete-items div {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: var(--bg-secondary);
|
background-color: var(--darker);
|
||||||
border-bottom: 1px solid var(--bg-main);
|
border-bottom: 1px solid var(--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-items div:hover {
|
.autocomplete-items div:hover {
|
||||||
|
@ -366,7 +345,7 @@ li {
|
||||||
|
|
||||||
.autocomplete-active {
|
.autocomplete-active {
|
||||||
background-color: var(--active);
|
background-color: var(--active);
|
||||||
color: var(--text);
|
color: var(--lighter);
|
||||||
}
|
}
|
||||||
|
|
||||||
.option {
|
.option {
|
||||||
|
@ -377,29 +356,29 @@ li {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"] {
|
input[type=range] {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 18px 0;
|
margin: 18px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]:focus {
|
input[type=range]:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]::-webkit-slider-runnable-track {
|
input[type=range]::-webkit-slider-runnable-track {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 8.4px;
|
height: 8.4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-color: var(--dark-grey), var(--light-grey);
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
background: var(--bg-main);
|
background: var(--light);
|
||||||
border-radius: 1.3px;
|
border-radius: 1.3px;
|
||||||
border: 0.2px inset var(--dark-grey);
|
border: 0.2px solid #010101;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]::-webkit-slider-thumb {
|
input[type=range]::-webkit-slider-thumb {
|
||||||
border-color: var(--active);
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
border: 1px solid var(--dark-grey);
|
border: 1px solid #000000;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -409,23 +388,23 @@ input[type="range"]::-webkit-slider-thumb {
|
||||||
margin-top: -14px;
|
margin-top: -14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]:focus::-webkit-slider-runnable-track {
|
input[type=range]:focus::-webkit-slider-runnable-track {
|
||||||
background: var(--bg-main);
|
background: var(--light);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]::-moz-range-track {
|
input[type=range]::-moz-range-track {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 8.4px;
|
height: 8.4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-color: var(--dark-grey), var(--light-grey);
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
background: var(--bg-main);
|
background: var(--light);
|
||||||
border-radius: 1.3px;
|
border-radius: 1.3px;
|
||||||
border: 0.2px inset var(--dark-grey);
|
border: 0.2px solid #010101;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="range"]::-moz-range-thumb {
|
input[type=range]::-moz-range-thumb {
|
||||||
border-color: var(--active);
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
border: 1px solid var(--dark-grey);
|
border: 1px solid #000000;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -433,106 +412,62 @@ input[type="range"]::-moz-range-thumb {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::placeholder {
|
@media (prefers-color-scheme: dark) {
|
||||||
color: var(--text);
|
|
||||||
opacity: 0.7;
|
body.popup, header, h1, input, select, div.tabcontent, button.tablinks.active {
|
||||||
|
background-color: var(--dark);
|
||||||
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
*:focus {
|
body {
|
||||||
outline: var(--active) solid 2px;
|
background-color: var(--darker);
|
||||||
|
}
|
||||||
|
|
||||||
|
a.button {
|
||||||
|
color: var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
::placeholder {
|
||||||
|
color: var(--text-main);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: light) {
|
||||||
|
|
||||||
|
body.popup, header, h1, input, select, div.tabcontent, button.tablinks.active, ul {
|
||||||
|
background-color: var(--lighter);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
--text: #000;
|
background-color: var(--light);
|
||||||
--text-secondary: #fff;
|
|
||||||
--bg-main: #e3e7ea;
|
|
||||||
--bg-secondary: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark-theme {
|
a.button {
|
||||||
--text: #fff;
|
color: var(--text-secondary);
|
||||||
--text-secondary: #000;
|
stroke: var(--text-secondary);
|
||||||
--bg-main: #3c4043;
|
|
||||||
--bg-secondary: #292a2d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup {
|
button.tablinks {
|
||||||
background-color: var(--bg-secondary);
|
background-color: var(--light);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#volume-value {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collapsible {
|
|
||||||
background-color: var(--bg-main);
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--active);
|
|
||||||
padding: 18px;
|
|
||||||
width: 100%;
|
|
||||||
border: none;
|
|
||||||
text-align: left;
|
|
||||||
outline: none;
|
|
||||||
font-size: 15px;
|
|
||||||
border-bottom: solid var(--active);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collapsible:after {
|
|
||||||
content: "\25BE";
|
|
||||||
color: var(--active);
|
|
||||||
font-weight: bold;
|
|
||||||
float: right;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collapsible-active,
|
|
||||||
.collapsible:hover,
|
|
||||||
.collapsible:hover::after {
|
|
||||||
background-color: var(--active);
|
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapsible-active:after {
|
::placeholder {
|
||||||
content: "\25B4";
|
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-weight: bold;
|
opacity: 0.7;
|
||||||
float: right;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapsible-content {
|
.tab button {
|
||||||
padding: 0 18px;
|
border-bottom: solid 1px var(--light);
|
||||||
display: none;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
button.tablinks.active {
|
||||||
height: 2px;
|
border-bottom: solid 1px var(--lighter);
|
||||||
background-color: var(--active);
|
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-badge {
|
.autocomplete-items div {
|
||||||
position: relative;
|
background-color: var(--light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-badge[data-new-badge]:after {
|
|
||||||
content: "New!";
|
|
||||||
position: absolute;
|
|
||||||
top: -10px;
|
|
||||||
right: -42px;
|
|
||||||
font-size: 0.9em;
|
|
||||||
background: var(--active);
|
|
||||||
color: white;
|
|
||||||
width: 35px;
|
|
||||||
height: 18px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 18px;
|
|
||||||
border-radius: 25px;
|
|
||||||
padding: 2px;
|
|
||||||
box-shadow: 0 0 1px var(--bg-secondary);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Privacy Policy for Privacy Redirect
|
||||||
|
|
||||||
|
**I solemnly swear this extension is up to only good! 🙂**
|
||||||
|
|
||||||
|
All aspects of the extension work locally on your device. With the exception of
|
||||||
|
OpenStreetMap (OSM) reverse geocoding, done via the [OSM Nomantim API](https://nominatim.org/release-docs/latest/),
|
||||||
|
used as part of OSM redirects, the extension does not connect to any other
|
||||||
|
third-party web services and it doesn’t collect or transmit
|
||||||
|
any information about you, your browsing habits, or your device.
|
||||||
|
|
||||||
|
The extension requires access to request data for **all websites** in order
|
||||||
|
to intercept requests made to targeted services (Twitter, YouTube, Instagram &
|
||||||
|
Google Maps) so that they may be redirected to the appropriate privacy
|
||||||
|
respecting alternative, all other requests are ignored.
|
||||||
|
|
||||||
|
The extension also requires **local storage** permissions in order to store
|
||||||
|
extension specific user preferences and settings.
|
||||||
|
|
||||||
|
The extension development is funded through gifts, donations and love.
|
|
@ -1,110 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Name of the extension."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Leitet Anfragen von Twitter, YouTube, Instagram & Google Maps auf datenschutzfreundliche Alternativen weiter.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Nitter-Instanz",
|
|
||||||
"description": "Label for Nitter instance field option (options)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Invidious-Instanz",
|
|
||||||
"description": "Label for Invidious instance field option (options)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Bibliogram-Instanz",
|
|
||||||
"description": "Label for Bibliogram instance field option (options)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "OpenStreetMap-Instanz",
|
|
||||||
"description": "Label for OSM instance field option (options)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Nitter-Weiterleitungen",
|
|
||||||
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Invidious-Weiterleitungen",
|
|
||||||
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Bibliogram-Weiterleitungen",
|
|
||||||
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "OpenStreetMap-Weiterleitungen",
|
|
||||||
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Videos immer durch Invidious-Proxy leiten",
|
|
||||||
"description": "Label for 'Always proxy videos through Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Nur eingebettete Videos zu Invidious weiterleiten",
|
|
||||||
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Videoqualität bei Invidious",
|
|
||||||
"description": "Label for 'Invidious Video Quality' option (options)."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Twitter-Serviceworker proaktiv entfernen",
|
|
||||||
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Dunklen Modus auf Invidious immer anschalten",
|
|
||||||
"description": "Label for 'Invidious dark mode always on' option (options)."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Invidious-Einstellungen dauerhaft beibehalten (als Cookie)",
|
|
||||||
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "Allgmein",
|
|
||||||
"description": "General tab (options)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Erweitert",
|
|
||||||
"description": "Advanced tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "Ausnahmen",
|
|
||||||
"description": "Exceptions tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Gib eine URL oder einen regulären Ausdruck (Regex) ein, die/der von Weiterleitungen ausgeschlossen werden soll.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Alle Anfragen für oder ausgehend von einer URL, die auf die Ausnahme zutrifft, werden von Weiterleitungen ausgeschlossen.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Hinweis – Unterstützt reguläre JavaScript-Ausdrücke (Regex), mit Ausnahme der einschließenden Schrägstriche.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "Ausnahme hinzufügen",
|
|
||||||
"description": "'Add Exceptions' button (options)."
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "Weitere Optionen",
|
|
||||||
"description": "More Options button (pop-up)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Privacy",
|
|
||||||
"description": "Extension title - Privacy (pop-up)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Redirect",
|
|
||||||
"description": "Extension title - Redirect (pop-up)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Version",
|
|
||||||
"description": "Version"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Eine einfache Browser-Erweiterung, die Anfragen an Twitter, YouTube, Instagram & Google Maps zu datenschutzfreundlichen Alternativen weiterleitet.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Leitet Anfragen an Twitter, YouTube, Instagram & Google Maps zu datenschutzfreundlichen Alternativen weiter – <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Erlaubt das Einstellen benutzerdefinierter Instanzen, das Ein- und Ausschalten aller Weiterleitungen und vieles mehr.
|
|
||||||
|
|
||||||
<b>★ Weitere Infos: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Der Code dieser Browser-Erweiterung ist verfügbar auf <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Spenden: 👨🏻💻</b>
|
|
||||||
Wenn Ihnen diese Erweiterung gefällt und Sie finanziell in der Lage sind, erwägen Sie bitte <a href='https://www.buymeacoffee.com/SimonBrazell'> mir auf BuyMeACoffee einen Kaffee zu kaufen</a> ☕️ ️ um Ihre Wertschätzung zu zeigen und die Fortsetzung des Projekts zu unterstützen.
|
|
||||||
|
|
||||||
<b>★ Berechtigungen: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Bitte beachten Sie, dass der Zugriff auf alle Website-Navigationsereignisse ( alle URLs), nicht nur auf die Zieldomains, erforderlich ist, damit eingebettete Video-Weiterleitungen stattfinden können. Zur Zeit kenne ich keine andere Möglichkeit, Iframe-Weiterleitungen zu realisieren, freue mich aber über Vorschläge dazu 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,162 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Name of the extension."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Nitter Instance",
|
|
||||||
"description": "Label for Nitter instance field option (options)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Invidious Instance",
|
|
||||||
"description": "Label for Invidious instance field option (options)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Bibliogram Instance",
|
|
||||||
"description": "Label for Bibliogram instance field option (options)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "OpenStreetMap Instance",
|
|
||||||
"description": "Label for OSM instance field option (options)."
|
|
||||||
},
|
|
||||||
"redditInstance": {
|
|
||||||
"message": "Reddit Instance",
|
|
||||||
"description": "Label for Reddit instance field option (options)."
|
|
||||||
},
|
|
||||||
"searchEngineInstance": {
|
|
||||||
"message": "Search Engine Instance",
|
|
||||||
"description": "Label for Search Engine instance field option (options)."
|
|
||||||
},
|
|
||||||
"simplyTranslateInstance": {
|
|
||||||
"message": "SimplyTranslate Instance",
|
|
||||||
"description": "Label for SimplyTranslate instance field option (options)."
|
|
||||||
},
|
|
||||||
"wikipediaInstance": {
|
|
||||||
"message": "Wikipedia Instance",
|
|
||||||
"description": "Label for Wikipedia instance field option (options)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Nitter Redirects",
|
|
||||||
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Invidious Redirects",
|
|
||||||
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Bibliogram Redirects",
|
|
||||||
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "OpenStreetMap Redirects",
|
|
||||||
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableReddit": {
|
|
||||||
"message": "Reddit Redirects",
|
|
||||||
"description": "Label for enable/disable Reddit redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableSearchEngine": {
|
|
||||||
"message": "Search Engine Redirects",
|
|
||||||
"description": "Label for enable/disable Search Engine redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableSimplyTranslate": {
|
|
||||||
"message": "SimplyTranslate Redirects",
|
|
||||||
"description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableWikipedia": {
|
|
||||||
"message": "Wikipedia Redirects",
|
|
||||||
"description": "Label for enable/disable Wikipedia redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Always proxy videos through Invidious",
|
|
||||||
"description": "Label for 'Always proxy videos through Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Only redirect embedded video to Invidious",
|
|
||||||
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Invidious Video Quality",
|
|
||||||
"description": "Label for 'Invidious Video Quality' option (options)."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Proactively remove Twitter service worker",
|
|
||||||
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Invidious dark mode always on",
|
|
||||||
"description": "Label for 'Invidious dark mode always on' option (options)."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Persist Invidious preferences (as cookie)",
|
|
||||||
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "General",
|
|
||||||
"description": "General tab (options)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Advanced",
|
|
||||||
"description": "Advanced tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "Exceptions",
|
|
||||||
"description": "Exceptions tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Enter a URL or Regular Expression to be excluded from redirects.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "All requests for or initiating from a URL that matches the exception will be excluded from redirects.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Note - Supports JavaScript regular expressions, excluding the enclosing forward slashes.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "Add Exception",
|
|
||||||
"description": "'Add Exceptions' button (options)."
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "More Options",
|
|
||||||
"description": "More Options button (pop-up)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Privacy",
|
|
||||||
"description": "Extension title - Privacy (pop-up)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Redirect",
|
|
||||||
"description": "Extension title - Redirect (pop-up)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Version",
|
|
||||||
"description": "Version"
|
|
||||||
},
|
|
||||||
"useFreeTube": {
|
|
||||||
"message": "Use FreeTube over Invidious when possible",
|
|
||||||
"description": "Label for 'Use FreeTube over Invidious when possible' option (options)."
|
|
||||||
},
|
|
||||||
"nitterRandomPool": {
|
|
||||||
"message": "Nitter random instance pool (comma-separated)",
|
|
||||||
"description": "Label for 'Nitter random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"invidiousRandomPool": {
|
|
||||||
"message": "Invidious random instance pool (comma-separated)",
|
|
||||||
"description": "Label for 'Invidious random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"bibliogramRandomPool": {
|
|
||||||
"message": "Bibliogram random instance pool (comma-separated)",
|
|
||||||
"description": "Label for 'Bibliogram random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"randomInstancePlaceholder": {
|
|
||||||
"message": "Random instance (none selected)",
|
|
||||||
"description": "Input placeholder for provider instance settings that select a random instance from a pool when none is selected"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Redirects Twitter, YouTube, Instagram, & Google Maps requests to privacy friendly alternatives - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Allows for setting custom instances, toggling all redirects on/off and more.
|
|
||||||
|
|
||||||
<b>★ More Info: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
The code for this web extension is available on <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Donate: 👨🏻💻</b>
|
|
||||||
If you like this extension and are financially able please consider <a href='https://www.buymeacoffee.com/SimonBrazell'>buying me a coffee</a> ☕️ ️to show your appreciation and support the continuation of the project.
|
|
||||||
|
|
||||||
<b>★ Permissions: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Please note, access to all website navigation events ( all URLs), not just the target domains, is required to allow embedded video redirects to occur. At this time I know of no other way to achieve iframe redirects, happy to hear some suggestions on this though 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,162 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Nombre de la extensión."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad.",
|
|
||||||
"description": "Descripción de la extensión."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Instancia de Nitter",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Nitter (opciones)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Instancia de Invidious",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Invidious (opciones)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Instancia de Bibliogram",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Bibliogram (opciones)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "Instancia de OpenStreetMap",
|
|
||||||
"description": "Etiqueta del campo para la instancia de OSM (opciones)."
|
|
||||||
},
|
|
||||||
"redditInstance": {
|
|
||||||
"message": "Instancia de Reddit",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Reddit (opciones)."
|
|
||||||
},
|
|
||||||
"searchEngineInstance": {
|
|
||||||
"message": "Instancia de Buscador",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Buscador (opciones)."
|
|
||||||
},
|
|
||||||
"simplyTranslateInstance": {
|
|
||||||
"message": "Instancia deSimplyTranslate",
|
|
||||||
"description": "Etiqueta del campo para la instancia de SimplyTranslate (opciones)."
|
|
||||||
},
|
|
||||||
"wikipediaInstance": {
|
|
||||||
"message": "Instancia de Wikipedia",
|
|
||||||
"description": "Etiqueta del campo para la instancia de Wikipedia (opciones)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Redirecciones de Nitter",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Nitter (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Redirecciones de Invidious",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Invidious (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Redirecciones de Bibliogram",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Bibliogram (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "Redirecciones de OpenStreetMap",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de OSM (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableReddit": {
|
|
||||||
"message": "Redirecciones de Reddit",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Reddit (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableSearchEngine": {
|
|
||||||
"message": "Redirecciones de Buscador",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Buscador (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableSimplyTranslate": {
|
|
||||||
"message": "Redirecciones de SimplyTranslate",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de SimplyTranslate (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"disableWikipedia": {
|
|
||||||
"message": "Redirecciones de Wikipedia",
|
|
||||||
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Wikipedia (opciones y pop-up)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Siempre usar el proxy de Invidious para videos",
|
|
||||||
"description": "Etiqueta para la opción de 'Siempre usar el proxy de Invidious para videos' (opciones)."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Solo redirigir los videos incrustados a Invidious",
|
|
||||||
"description": "Etiqueta para la opción de 'Solo redirigir los videos incrustados a Invidious' (opciones)."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Calidad de Video de Invidious",
|
|
||||||
"description": "Etiqueta para la opción de 'Calidad de Video de Invidious' (opciones)."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Eliminar proactivamente el service worker de Twitter",
|
|
||||||
"description": "Etiqueta para la opción de 'Eliminar proactivamente el service worker de Twitter' (opciones)."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Modo oscuro de Invidious siempre activo",
|
|
||||||
"description": "Etiqueta para la opción de 'Modo oscuro de Invidious siempre activo' (opciones)."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Preservar preferencias de Invidious (como cookie)",
|
|
||||||
"description": "Etiqueta para la opción de 'Preservar preferencias de Invidious (como cookie)' (opciones)."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "General",
|
|
||||||
"description": "Pestaña general (opciones)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Avanzado",
|
|
||||||
"description": "Pestaña avanzado (opciones)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "Excepciones",
|
|
||||||
"description": "Pestaña de excepciones (opciones)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Ingrese la URL o la Expresión Regular a excluir de las redirecciones.",
|
|
||||||
"description": "Una descripción de la función 'Excepciones' párrafo 1 (opciones)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Todas las solicitudes para o provenientes de una URL que coincida con la excepción serán excluidas de las redirecciones.",
|
|
||||||
"description": "Una descripción de la función 'Excepciones' párrafo 2 (opciones)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Nota – Soporta expresiones regulares de JavaScript, excluyendo las barras oblicuas de cierre.",
|
|
||||||
"description": "Una descripción de la función 'Excepciones' párrafo 3 (opciones)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "Agregar Excepción",
|
|
||||||
"description": "Botón de 'Agregar Excepción' (opciones)."
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "Más Opciones",
|
|
||||||
"description": "Botón de 'Más Opciones' (pop-up)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Privacy",
|
|
||||||
"description": "Título de la extensión - Privacy (pop-up)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Redirect",
|
|
||||||
"description": "Título de la extensión - Redirect (pop-up)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Versión",
|
|
||||||
"description": "Versión"
|
|
||||||
},
|
|
||||||
"useFreeTube": {
|
|
||||||
"message": "Usar FreeTube en vez de Invidious cuando sea posible",
|
|
||||||
"description": "Etiqueta para la opción de 'Usar FreeTube en vez de Invidious cuando sea posible' (opciones)."
|
|
||||||
},
|
|
||||||
"nitterRandomPool": {
|
|
||||||
"message": "Grupo de instancias aleatorias de Nitter (separadas por coma)",
|
|
||||||
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Nitter (separadas por coma)' (opciones)."
|
|
||||||
},
|
|
||||||
"invidiousRandomPool": {
|
|
||||||
"message": "Grupo de instancias aleatorias de Invidious (separadas por coma)",
|
|
||||||
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Invidious (separadas por coma)' (opciones)."
|
|
||||||
},
|
|
||||||
"bibliogramRandomPool": {
|
|
||||||
"message": "Grupo de instancias aleatorias de Bibliogram (separadas por coma)",
|
|
||||||
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Bibliogram (separadas por coma)' (opciones)."
|
|
||||||
},
|
|
||||||
"randomInstancePlaceholder": {
|
|
||||||
"message": "Instancia aleatoria (ninguna seleccionada)",
|
|
||||||
"description": "Entrada provisional en la configuración del proveedor de instancia que selecciona una instancia aleatoria del grupo cuando ninguna está seleccionada"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Una extensión web simple que redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description (AMO):
|
|
||||||
|
|
||||||
```
|
|
||||||
Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad. - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Permite ingresar instancias personalizadas, activar/desactivar todas las redirecciones y más.
|
|
||||||
|
|
||||||
<b>★ Más Información: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
El código de esta extensión web está disponible en <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Dona: 👨🏻💻</b>
|
|
||||||
Si te gusta esta extensión y tienes los recursos económicos, por favor considera <a href='https://www.buymeacoffee.com/SimonBrazell'>comprarme un café</a> ☕️ para mostrar tu aprecio y apoyo al desarrollo del proyecto.
|
|
||||||
|
|
||||||
<b>★ Permisos: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Por favor, tenga en cuenta que se requiere acceso a todos los eventos de navegación del sitio web (todas las URL), no solo a los dominios de destino, para permitir redireccionamientos de videos incrustados. En este momento no conozco ninguna otra manera de lograr redirecciones iframe; sin embargo, estaría feliz de escuchar algunas sugerencias al respecto 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description (Chrome & Mircosoft):
|
|
||||||
|
|
||||||
```
|
|
||||||
★ Más Información: ℹ️
|
|
||||||
• Nitter - https://github.com/zedeus/nitter
|
|
||||||
• Invidious - https://github.com/omarroth/invidious
|
|
||||||
• Bibliogram - https://github.com/cloudrac3r/bibliogram
|
|
||||||
• OpenStreetMap - https://wiki.openstreetmap.org
|
|
||||||
|
|
||||||
El código de esta extensión web está disponible en Github - https://github.com/SimonBrazell/privacy-redirect
|
|
||||||
|
|
||||||
★ Dona: 👨🏻💻
|
|
||||||
Si te gusta esta extensión y tienes los recursos económicos, por favor considera comprarme un café ☕️ para mostrar tu aprecio y apoyo al desarrollo del proyecto.
|
|
||||||
|
|
||||||
☕️ https://www.buymeacoffee.com/SimonBrazell ☕️
|
|
||||||
🍻 https://liberapay.com/SimonBrazell/donate 🍻
|
|
||||||
|
|
||||||
★ Permisos: ℹ️
|
|
||||||
• Por favor, tenga en cuenta que se requiere acceso a todos los eventos de navegación del sitio web (todas las URL), no solo a los dominios de destino, para permitir redireccionamientos de videos incrustados. En este momento no conozco ninguna otra manera de lograr redirecciones iframe; sin embargo, estaría feliz de escuchar algunas sugerencias al respecto 🙂
|
|
||||||
```
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Redirige les requêtes les demandes Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la vie privée. pour Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la vie privée.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Redirige les requêtes pour Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la confidentialité - <a href="https://nitter.net/">Nitter</a>, <a href="https://invidio.us/">Invidious</a>, <a href="https://bibliogram.art/">Bibliogram</a>, & <a href="https://www.openstreetmap.org">OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Permet de définir des instances personnalisées et d'activer ou désactiver toutes les redirections.
|
|
||||||
|
|
||||||
<b>★ Plus d'informations: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/zedeus/nitter#nitter-wip">Nitter</a></li>
|
|
||||||
<li><a href="https://github.com/omarroth/invidious#invidious">Invidious</a></li>
|
|
||||||
<li><a href="https://github.com/cloudrac3r/bibliogram#bibliogram">Bibliogram</a></li>
|
|
||||||
<li><a href="https://wiki.openstreetmap.org/">OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Le code de cette extension Web est disponible sur <a href="https://github.com/SimonBrazell/privacy-redirect">Github</a>.
|
|
||||||
|
|
||||||
<b>★ Faire un don: 👨🏻💻</b>
|
|
||||||
Si vous aimez ce module complémentaire et si vous avez une bonne situation financière, pensez à <a href="https://www.buymeacoffee.com/SimonBrazell">m'acheter un café</a> ☕️ pour montrer que vous appréciez et soutenez la poursuite du projet.
|
|
||||||
|
|
||||||
<b>★ Autorisations: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Veuillez noter que l'accès à tous les événements de navigation sur le site Web (toutes les adresses URL), et pas seulement aux domaines cibles, est requis pour permettre aux redirections vidéo intégrées de se faire correctement. Pour le moment, je ne connais aucun autre moyen de réaliser des redirections iframe, je serais heureux d'entendre quelques suggestions à ce sujet cependant 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,154 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Name of the extension."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Reindirizza Twitter, YouTube, Instagram ed altri verso alternative rispettose della privacy.",
|
|
||||||
"description": "Description of the extension."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Istanza di Nitter",
|
|
||||||
"description": "Label for Nitter instance field option (options)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Istanza di Invidious",
|
|
||||||
"description": "Label for Invidious instance field option (options)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Istanza di Bibliogram",
|
|
||||||
"description": "Label for Bibliogram instance field option (options)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "Istanza di OpenStreetMap",
|
|
||||||
"description": "Label for OSM instance field option (options)."
|
|
||||||
},
|
|
||||||
"redditInstance": {
|
|
||||||
"message": "Istanza di Reddit",
|
|
||||||
"description": "Label for Reddit instance field option (options)."
|
|
||||||
},
|
|
||||||
"searchEngineInstance": {
|
|
||||||
"message": "Istanza del motore di ricerca",
|
|
||||||
"description": "Label for Search Engine instance field option (options)."
|
|
||||||
},
|
|
||||||
"simplyTranslateInstance": {
|
|
||||||
"message": "Istanza di SimplyTranslate",
|
|
||||||
"description": "Label for SimplyTranslate instance field option (options)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Reindirizzamenti Nitter",
|
|
||||||
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Reindirizzamenti Invidious",
|
|
||||||
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Reindirizzamenti Bibliogram",
|
|
||||||
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "Reindirizzamenti OpenStreetMap",
|
|
||||||
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableReddit": {
|
|
||||||
"message": "Reindirizzamenti Reddit",
|
|
||||||
"description": "Label for enable/disable Reddit redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableSearchEngine": {
|
|
||||||
"message": "Reindirizzamenti motore di ricerca",
|
|
||||||
"description": "Label for enable/disable Search Engine redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"disableSimplyTranslate": {
|
|
||||||
"message": "Reindirizzamenti SimplyTranslate",
|
|
||||||
"description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Usa sempre il proxy per i video su Invidious",
|
|
||||||
"description": "Label for 'Always proxy videos through Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Reindirizza solo i video incorporati verso Invidious",
|
|
||||||
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Qualità video di Invidious",
|
|
||||||
"description": "Label for 'Invidious Video Quality' option (options)."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Rimuovi proattivamente il service worker di Twitter",
|
|
||||||
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Modalità scura di Invidious sempre attiva",
|
|
||||||
"description": "Label for 'Invidious dark mode always on' option (options)."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Mantieni le preferenze di Invidious (con cookie)",
|
|
||||||
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "Generali",
|
|
||||||
"description": "General tab (options)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Avanzate",
|
|
||||||
"description": "Advanced tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "Eccezioni",
|
|
||||||
"description": "Exceptions tab (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Inserisci un URL o espressione regolare da escludere dai reindirizzamenti.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Tutte le richieste verso o da un URL corrispondente all'eccezione saranno escluse dai reindirizzamenti.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Nota - Supporta le espressioni regolari JavaScript, esclusi gli slash.",
|
|
||||||
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "Aggiungi eccezione",
|
|
||||||
"description": "'Add Exceptions' button (options)."
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "Altre opzioni",
|
|
||||||
"description": "More Options button (pop-up)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Privacy",
|
|
||||||
"description": "Extension title - Privacy (pop-up)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Redirect",
|
|
||||||
"description": "Extension title - Redirect (pop-up)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Versione",
|
|
||||||
"description": "Version"
|
|
||||||
},
|
|
||||||
"useFreeTube": {
|
|
||||||
"message": "Usa FreeTube al posto di Invidious quando possibile",
|
|
||||||
"description": "Label for 'Use FreeTube over Invidious when possible' option (options)."
|
|
||||||
},
|
|
||||||
"nitterRandomPool": {
|
|
||||||
"message": "Gruppo di istanze Nitter casuali (separate da virgola)",
|
|
||||||
"description": "Label for 'Nitter random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"invidiousRandomPool": {
|
|
||||||
"message": "Gruppo di istanze Invidious casuali (separate da virgola)",
|
|
||||||
"description": "Label for 'Invidious random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"bibliogramRandomPool": {
|
|
||||||
"message": "Gruppo di istanze Bibliogram casuali (separate da virgola)",
|
|
||||||
"description": "Label for 'Bibliogram random instance pool (comma-separated)' option (options)."
|
|
||||||
},
|
|
||||||
"randomInstancePlaceholder": {
|
|
||||||
"message": "Istanza casuale (nessuna selezione)",
|
|
||||||
"description": "Input placeholder for provider instance settings that select a random instance from a pool when none is selected"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Una semplice estensione che reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a> e <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Permette di impostare istanze personalizzate, attivare/disattivare tutti i reindirizzamenti e altro.
|
|
||||||
|
|
||||||
<b>★ Maggiori informazioni: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Il codice sorgente di questa estensione è disponibile su <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Dona: 👨🏻💻</b>
|
|
||||||
Se ti piace questa estensione e te lo puoi permettere, considera di <a href='https://www.buymeacoffee.com/SimonBrazell'>offrirmi un caffè</a> ☕️ ️per mostrare il tuo apprezzamento e supportare lo sviluppo del progetto.
|
|
||||||
|
|
||||||
<b>★ Permessi: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Si prega di notare che l'accesso a tutti gli eventi di navigazione web (tutti gli URL), non solo ai domini di destinazione, è necessario per permettere i reindirizzamenti dei video incorporati. Ad oggi non conosco un altro modo per fare i reindirizzamenti di iframe, sarò felice di ricevere suggerimenti al riguardo 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,110 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Nazwa rozszerzenia."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Przekierowuje serwisy takie jak: Twitter, YouTube, Instagram i Google Maps do alternatyw sprzyjających prywatności.",
|
|
||||||
"description": "Opis rozszerzenia."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Instancja Nitter",
|
|
||||||
"description": "Etykieta dla pola wyboru instancji Nitter (opcje)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Instancja Invidious",
|
|
||||||
"description": "Etykieta dla pola wyboru instancji Invidious (opcje)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Instancja Bibliogram",
|
|
||||||
"description": "Etykieta dla pola wyboru instancji Bibliogram (opcje)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "Instancja OpenStreetMap",
|
|
||||||
"description": "Etykieta dla pola wyboru instancji OpenStreetMap (opcje)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Przekierowanie Nitter",
|
|
||||||
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Nitter (opcje i okno pop-up)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Przekierowanie Invidious ",
|
|
||||||
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Invidious (opcje i okno pop-up)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Przekierowanie Bibliogram",
|
|
||||||
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Bibliogram (opcje i okno pop-up)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "Przekierowanie OpenStreetMap",
|
|
||||||
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania OpenStreetMap (opcje i okno pop-up)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Zawsze buforuj i wyświetlaj odnośniki wideo z YouTube poprzez Invidious",
|
|
||||||
"description": "Etykieta dla opcji 'Zawsze buforuj i wyświetlaj odnośniki wideo poprzez Invidious'."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Jedynie przekieruj odnośniki wideo do instancji Invidious",
|
|
||||||
"description": "Etykieta dla opcji 'Jedynie przekieruj odnośniki wideo do instancji Invidious'."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Jakość wideo Invidious",
|
|
||||||
"description": "Etykieta dla opcji 'Jakość wideo Invidious'."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Proaktywnie usuwaj skrypty serwisowe (service worker) Twittera",
|
|
||||||
"description": "Etykieta dla opcji 'Proaktywnie usuwaj skrypty serwisowe (service worker) Twittera'."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Tryb ciemny dla Invidious zawsze włączony",
|
|
||||||
"description": "Etykieta dla opcji 'Tryb ciemny dla Invidious zawsze włączony'."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Zapisz ustawienia Invidious (jako plik cookie)",
|
|
||||||
"description": "Etykieta dla 'Zapisz ustawienia Invidious (jako plik cookie)'."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "Główne",
|
|
||||||
"description": "Zakładka Główne (opcje)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Advanced",
|
|
||||||
"description": "Zakładka zaawansowane (opcje)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "Wyjątki",
|
|
||||||
"description": "Zakładka wyjątki (opcje)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Wprowadź adres URL lub wyrażenie regularne, które zostanie wyłączone z przekierowania. ",
|
|
||||||
"description": "Opis funkcji 'Wyjątki' paragraf 1 (opcje)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "Wszystkie żądania dla lub inicjalizujące z adresu URL które spełniają wyjątek zostaną wyłączone z przekierowania.",
|
|
||||||
"description": "Opis funkcji 'Wyjątki' paragraf 2 (opcje)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Informacja - Wspierane są wyrażenia regularne JavaScript, wyłączając ukośniki lewe zamykające.",
|
|
||||||
"description": "Opis funkcji 'Wyjątki' paragraf 3 (opcje)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "Dodaj wyjątek",
|
|
||||||
"description": "Przycisk 'Dodaj wyjątek' (opcje)."
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "Więcej opcji",
|
|
||||||
"description": "Przycisk 'Więcej opcji' (okno pop-up)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Prywatność",
|
|
||||||
"description": "Tytuł rozszerzenia - Privacy (okno pop-up)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Redirect",
|
|
||||||
"description": "Tytuł rozszerzenia - Redirect (pop-up)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Version",
|
|
||||||
"description": "Wersja"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Prosta wtyczka która przekierowuje żądania Twitter, YouTube, Instagram oraz Google Maps na odpowiedniki przyjazne dla prywatności.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Przekierowuje żądania Twitter, YouTube, Instagram oraz Google Maps na odpowiedniki przyjazne dla prywatności - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Umożliwia ustawienie niestandardowych instancji usług, przełączania przekierowania jako aktywne/nieaktwne i o wiele więcej.
|
|
||||||
<b>★ Więcej informacji: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Kod źródłowy tego rozszerzenia jest dostępny na: <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Donate: 👨🏻💻</b>
|
|
||||||
Jeżeli lubisz to rozszerzenie i chcesz wesprzeć autora finanosowo, proszę pomyśl o <a href='https://www.buymeacoffee.com/SimonBrazell'>zaserwowaniu małej czarnej</a> ☕️ ️aby pokazać swoją wdzięczność i wesprzeć możliwości kontynuowania projektu.
|
|
||||||
|
|
||||||
<b>★ Uprawnienia: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Zwróć uwagę, że dostęp do wszystkich zdarzeń dotyczących nawigacji po stronach (wszystkie adresy URL) jest wymagany dla poprawnego odtwarzania osadzonych plików wideo. Obecnie nie znam innych możliwości aby obsłużyć przekierowania ramek iFrame, będę wdzięczny za sugestie 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Простое расширение для браузера, которое перенаправляет запросы к Twitter, YouTube, Instagram & Google Maps на альтернативные сервисы, дружелюбные к приватности.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
Перенаправляет запросы к Twitter, YouTube, Instagram, & Google Maps на альтернативные сервисы, дружелюбные к приватности - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a> и <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Позволяет настраивать пользовательские сервисы, включать/выключать все перенаправления и т.д.
|
|
||||||
|
|
||||||
<b>★ Дополнительная информация: ℹ</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Исходный код данного расширения доступен на <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
|
|
||||||
|
|
||||||
<b>★ Пожертвовать: 👨🏻💻</b>
|
|
||||||
Если вам нравится это расширение и вы можете помочь финансово, пожалуйста, <a href='https://www.buymeacoffee.com/SimonBrazell'>купите мне кофе</a> ☕ и покажите ваше одобрение и поддержку развития проекта.
|
|
||||||
|
|
||||||
<b>★ Разрешения: ℹ</b>
|
|
||||||
<ul>
|
|
||||||
<li>Важно: доступ ко всем сайтам (URL), не только к целевым, требуется для разрешения перенаправления встроенных видео. В данный момент я не знаю, как осуществить перенаправление iframe, буду рад выслушать ваши предложения 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
|
@ -1,146 +0,0 @@
|
||||||
{
|
|
||||||
"extensionName": {
|
|
||||||
"message": "Privacy Redirect",
|
|
||||||
"description": "Uzantı ismi."
|
|
||||||
},
|
|
||||||
"extensionDescription": {
|
|
||||||
"message": "Twitter, YouTube, Instagram, Google Haritalar, Reddit & Google Arama bağlantılarını gizlilik dostu alternatiflerine yönlendirir.",
|
|
||||||
"description": "Uzantı açıklaması."
|
|
||||||
},
|
|
||||||
"nitterInstance": {
|
|
||||||
"message": "Nitter Servisi",
|
|
||||||
"description": "Nitter Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"invidiousInstance": {
|
|
||||||
"message": "Invidious Servisi",
|
|
||||||
"description": "Invidious Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"bibliogramInstance": {
|
|
||||||
"message": "Bibliogram Servisi",
|
|
||||||
"description": "Bibliogram Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"osmInstance": {
|
|
||||||
"message": "OpenStreetMap Servisi",
|
|
||||||
"description": "OSM Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"redditInstance": {
|
|
||||||
"message": "Reddit Servisi",
|
|
||||||
"description": "Reddit Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"searchEngineInstance": {
|
|
||||||
"message": "Arama Motoru Servisi",
|
|
||||||
"description": "Arama Motoru Servisi seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"disableNitter": {
|
|
||||||
"message": "Nitter Yönlendirmesi",
|
|
||||||
"description": "Nitter Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"disableInvidious": {
|
|
||||||
"message": "Invidious Yönlendirmesi",
|
|
||||||
"description": "Invidious Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"disableBibliogram": {
|
|
||||||
"message": "Bibliogram Yönlendirmesi",
|
|
||||||
"description": "Bibliogram Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"disableOsm": {
|
|
||||||
"message": "OpenStreetMap Yönlendirmesi",
|
|
||||||
"description": "OSM Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"disableReddit": {
|
|
||||||
"message": "Reddit Yönlendirmesi",
|
|
||||||
"description": "Reddit Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"disableSearchEngine": {
|
|
||||||
"message": "Arama Motoru Yönlendirmesi",
|
|
||||||
"description": "Arama Motoru Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
|
|
||||||
},
|
|
||||||
"alwaysProxy": {
|
|
||||||
"message": "Videoları her zaman Invidious üzerinden geçir",
|
|
||||||
"description": "'Videoları her zaman Invidious üzerinden geçir' seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"onlyEmbeddedVideo": {
|
|
||||||
"message": "Sadece siteye gömülü videoları Invidious'a yönlendir",
|
|
||||||
"description": "'Sadece siteye gömülü videoları Invidious'a yönlendir' seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"videoQuality": {
|
|
||||||
"message": "Invidious Video Kalitesi",
|
|
||||||
"description": "'Invidious Video Kalitesi' seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"removeTwitterSW": {
|
|
||||||
"message": "Twitter servis çalışanını proaktif olarak kaldır",
|
|
||||||
"description": "'Twitter servis çalışanını proaktif olarak kaldır' seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"invidiousDarkMode": {
|
|
||||||
"message": "Invidious her zaman açık karanlık mod",
|
|
||||||
"description": "'Invidious her zaman açık karanlık mod' seçeneği için etiket (seçenekler)."
|
|
||||||
},
|
|
||||||
"persistInvidiousPrefs": {
|
|
||||||
"message": "Invidious tercihlerini kaydet (çerez olarak)",
|
|
||||||
"description": "'Persist Invidious preferences (as cookie)' option (seçenekler)."
|
|
||||||
},
|
|
||||||
"generalTab": {
|
|
||||||
"message": "Genel",
|
|
||||||
"description": "Genel sekme (seçenekler)."
|
|
||||||
},
|
|
||||||
"advancedTab": {
|
|
||||||
"message": "Gelişmiş",
|
|
||||||
"description": "Gelişmiş sekme (seçenekler)."
|
|
||||||
},
|
|
||||||
"exceptionsTab": {
|
|
||||||
"message": "İstisnalar",
|
|
||||||
"description": "İstisnalar sekmesi (seçenekler)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP1": {
|
|
||||||
"message": "Yönlendirmelerden hariç tutulacak bir URL veya düzenli ifade gir",
|
|
||||||
"description": "'İstisnalar' özelliği paragraf 1'in açıklaması (seçenekler)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP2": {
|
|
||||||
"message": "İstisnayla eşleşen bir URL'ye yönelik veya URL'den çıkan bütün bağlantılar yönlendirmelerden hariç tutulacak",
|
|
||||||
"description": "'İstisnalar' özelliği paragraf 2'nin açıklaması (seçenekler)."
|
|
||||||
},
|
|
||||||
"exceptionsDescriptionP3": {
|
|
||||||
"message": "Not - JavaScript düzenli ifadelerini destekler, kapalı eğik çizgiler kullanılmadan.",
|
|
||||||
"description": "'İstisnalar' özelliği paragraf 3'ün açıklaması (seçenekler)."
|
|
||||||
},
|
|
||||||
"addException": {
|
|
||||||
"message": "İstisna ekle",
|
|
||||||
"description": "'İstisna ekle' butonu (seçenekler)"
|
|
||||||
},
|
|
||||||
"moreOptions": {
|
|
||||||
"message": "Daha Fazla Seçenek",
|
|
||||||
"description": "Daha Fazla Seçenek butonu (açılır pencere)."
|
|
||||||
},
|
|
||||||
"privacy": {
|
|
||||||
"message": "Gizlilik",
|
|
||||||
"description": "Uzantı ismi - Gizlilik (açılır pencere)."
|
|
||||||
},
|
|
||||||
"redirect": {
|
|
||||||
"message": "Yönlendir",
|
|
||||||
"description": "Uzantı ismi - Yönlendir (açılır pencere)."
|
|
||||||
},
|
|
||||||
"version": {
|
|
||||||
"message": "Sürüm",
|
|
||||||
"description": "Sürüm"
|
|
||||||
},
|
|
||||||
"useFreeTube": {
|
|
||||||
"message": "Mümkün olduğunda Invidious yerine FreeTube kullan",
|
|
||||||
"description": "'Mümkün olduğunda Invidious yerine FreeTube kullan' seçeneği etiketi (seçenekler)."
|
|
||||||
},
|
|
||||||
"nitterRandomPool": {
|
|
||||||
"message": "Nitter rastgele servis havuzu (virgülle ayrılmış)",
|
|
||||||
"description": "'Nitter rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
|
|
||||||
},
|
|
||||||
"invidiousRandomPool": {
|
|
||||||
"message": "Invidious rastgele servis havuzu (virgülle ayrılmış)",
|
|
||||||
"description": "'Invidious rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
|
|
||||||
},
|
|
||||||
"bibliogramRandomPool": {
|
|
||||||
"message": "Bibliogram rastgele servis havuzu (virgülle ayrılmış)",
|
|
||||||
"description": "'Bibliogram rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
|
|
||||||
},
|
|
||||||
"randomInstancePlaceholder": {
|
|
||||||
"message": "Rastgele servis (hiçbir servis seçilmedi)",
|
|
||||||
"description": "Hiçbir servis seçilmediğinde bir havuzdan rastgele servis seçen sağlayıcı servis ayarları için yer tutucu"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,56 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
Twitter, YouTube, Instagram & Google Haritalar bağlantılarını gizlilik dostu alternatiflerine yönlendiren basit bir web uzantısı.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description (AMO):
|
|
||||||
|
|
||||||
```
|
|
||||||
Twitter, YouTube, Instagram, & Google Haritalar bağlantılarını gizlilik dostu alternatiflerine yönlendirir - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
|
|
||||||
|
|
||||||
Allows for setting custom instances, toggling all redirects on/off and more.
|
|
||||||
|
|
||||||
<b>★ Daha Fazla Bilgi: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Bu web uzantısının kaynak kodu <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>'da mevcut'.
|
|
||||||
|
|
||||||
<b>★ Bağış At: 👨🏻💻</b>
|
|
||||||
Eğer bu uzantıyı seviyorsan ve minnettarlığını gösterip projenin devamını destekliyorsan ve bana bir <a href='https://www.buymeacoffee.com/SimonBrazell'>kahve alıcak</a> ☕️ kadar maddi durumun varsa.
|
|
||||||
|
|
||||||
<b>★ İzinler: ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>Lütfen aklınızda bulundurun, siteye gömülü video yönlendirmelerinin çalışması için bütün website dolaşım etkinliklerine, sadece hedef alan adlarına değil, erişim gereklidir. Şu anda çerçeve yönlendirmenin başka hiçbir yolunu bilmiyorum, bununla ilgili bazı öneriler duymaya sevinirim 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description (Chrome & Mircosoft):
|
|
||||||
|
|
||||||
```
|
|
||||||
★ Daha Fazla Bilgi: ℹ️
|
|
||||||
• Nitter - https://github.com/zedeus/nitter
|
|
||||||
• Invidious - https://github.com/omarroth/invidious
|
|
||||||
• Bibliogram - https://github.com/cloudrac3r/bibliogram
|
|
||||||
• OpenStreetMap - https://wiki.openstreetmap.org
|
|
||||||
|
|
||||||
Özel örnekler ayarlamaya, tüm yönlendirmeleri açıp kapatmaya ve daha fazlasına izin verir.
|
|
||||||
|
|
||||||
Bu web uzantısının kaynak kodu Github'da mevcut' - https://github.com/SimonBrazell/privacy-redirect
|
|
||||||
|
|
||||||
★ Bağış At: 👨🏻💻
|
|
||||||
Eğer bu uzantıyı seviyorsan ve minnettarlığını gösterip projenin devamını destekliyorsan ve bana bir kahve alıcak ☕️ kadar maddi durumun varsa.
|
|
||||||
|
|
||||||
☕️ https://www.buymeacoffee.com/SimonBrazell ☕️
|
|
||||||
🍻 https://liberapay.com/SimonBrazell/donate 🍻
|
|
||||||
|
|
||||||
★ İzinler: ℹ️
|
|
||||||
• Lütfen aklınızda bulundurun, siteye gömülü video yönlendirmelerinin çalışması için bütün website dolaşım etkinliklerine, sadece hedef alan adlarına değil, erişim gereklidir. Şu anda çerçeve yönlendirmenin başka hiçbir yolunu bilmiyorum, bununla ilgili bazı öneriler duymaya sevinirim 🙂
|
|
||||||
```
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Extension Store (AMO & Chrome Web Store) Listing
|
|
||||||
|
|
||||||
## Summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
一个简单的扩展程序来将 Twitter、YouTube、Instagram 和 Google地图重定向至尊重隐私的替代品。
|
|
||||||
```
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
|
|
||||||
```
|
|
||||||
将 Twitter、YouTube、Instagram 和 Google地图重定向至尊重隐私的替代品: <a href='https://nitter.net/'>Nitter</a>、<a href='https://invidio.us/'>Invidious</a>、<a href='https://bibliogram.art/'>Bibliogram</a> 和 <a href='https://www.openstreetmap.org'>OpenStreetMap</a>。
|
|
||||||
|
|
||||||
允许自定义实例,开关重定向等设定。
|
|
||||||
|
|
||||||
<b>★ 更多详细:ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
|
|
||||||
<li><a href='https://github.com/iv-org/invidious#invidious'>Invidious</a></li>
|
|
||||||
<li><a href='https://sr.ht/~cadence/bibliogram/#a-hrefhttpsbibliogramartbibliograma'>Bibliogram</a></li>
|
|
||||||
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
本扩展的源代码可在 <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a> 上查看。
|
|
||||||
|
|
||||||
<b>★ 捐赠:👨🏻💻</b>
|
|
||||||
若您喜欢本扩展程序,且有闲钱,不妨<a href='https://www.buymeacoffee.com/SimonBrazell'>给我买杯咖啡</a>来表达您对这个项目的感谢与支持。
|
|
||||||
|
|
||||||
<b>★ 权限:ℹ️</b>
|
|
||||||
<ul>
|
|
||||||
<li>请注意,您需授予查看所有 URL(不只是需要重定向的URL)网站导向活动的权限,以来重定向嵌入的视频。目前我不知道其他重定向iframe的方法,有能者请解囊相助! 🙂</li>
|
|
||||||
</ul>
|
|
||||||
```
|
|
Before Width: | Height: | Size: 323 KiB |
Before Width: | Height: | Size: 688 KiB |
Before Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 1014 KiB |
Before Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 328 KiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 709 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 690 B |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB |
|
@ -1,12 +0,0 @@
|
||||||
function filterInstances(instances) {
|
|
||||||
return instances.filter((instance) => !instance.includes(".onion"));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRandomInstance(instances) {
|
|
||||||
return instances[~~(instances.length * Math.random())];
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
filterInstances,
|
|
||||||
getRandomInstance,
|
|
||||||
};
|
|
|
@ -1,52 +0,0 @@
|
||||||
const targets = /https?:\/\/(((www|maps)\.)?(google\.).*(\/maps)|maps\.(google\.).*)/;
|
|
||||||
const redirects = ["https://openstreetmap.org"];
|
|
||||||
const mapCentreRegex = /@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/;
|
|
||||||
const dataLatLngRegex = /(!3d|!4d)(-?[0-9]{1,10}.[0-9]{1,10})/g;
|
|
||||||
const placeRegex = /\/place\/(.*)\//;
|
|
||||||
const travelModes = {
|
|
||||||
driving: "fossgis_osrm_car",
|
|
||||||
walking: "fossgis_osrm_foot",
|
|
||||||
bicycling: "fossgis_osrm_bike",
|
|
||||||
transit: "fossgis_osrm_car", // not implemented on OSM, default to car.
|
|
||||||
};
|
|
||||||
const layers = {
|
|
||||||
none: "S",
|
|
||||||
transit: "T",
|
|
||||||
traffic: "S", // not implemented on OSM, default to standard.
|
|
||||||
bicycling: "C",
|
|
||||||
};
|
|
||||||
function addressToLatLng(address, callback) {
|
|
||||||
const xmlhttp = new XMLHttpRequest();
|
|
||||||
xmlhttp.onreadystatechange = () => {
|
|
||||||
if (xmlhttp.readyState === XMLHttpRequest.DONE) {
|
|
||||||
if (xmlhttp.status === 200) {
|
|
||||||
const json = JSON.parse(xmlhttp.responseText)[0];
|
|
||||||
if (json) {
|
|
||||||
callback(
|
|
||||||
`${json.lat}%2C${json.lon}`,
|
|
||||||
`${json.boundingbox[2]},${json.boundingbox[1]},${json.boundingbox[3]},${json.boundingbox[0]}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.info("Error: Status is " + xmlhttp.status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xmlhttp.open(
|
|
||||||
"GET",
|
|
||||||
`https://nominatim.openstreetmap.org/search/${address}?format=json&limit=1`,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
xmlhttp.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
mapCentreRegex,
|
|
||||||
dataLatLngRegex,
|
|
||||||
placeRegex,
|
|
||||||
travelModes,
|
|
||||||
layers,
|
|
||||||
addressToLatLng,
|
|
||||||
};
|
|
|
@ -1,27 +0,0 @@
|
||||||
const targets = /https?:\/\/(((www|maps)\.)?(google\.).*(\/search)|search\.(google\.).*)/;
|
|
||||||
const redirects = [
|
|
||||||
{ link: "https://duckduckgo.com", q: "/" },
|
|
||||||
{ link: "https://startpage.com", q: "/search/" },
|
|
||||||
{ link: "https://www.ecosia.org", q: "/search" },
|
|
||||||
{ link: "https://www.qwant.com", q: "/" },
|
|
||||||
{ link: "https://www.mojeek.com", q: "/search" },
|
|
||||||
{ link: "https://search.snopyta.org", q: "/" },
|
|
||||||
{ link: "https://searx.info", q: "/" },
|
|
||||||
{ link: "https://searx.be", q: "/" },
|
|
||||||
{ link: "https://search.disroot.org", q: "/" },
|
|
||||||
{ link: "https://searx.tuxcloud.net", q: "/" },
|
|
||||||
{ link: "https://searx.ninja", q: "/" },
|
|
||||||
{ link: "https://tromland.org/searx", q: "/search" },
|
|
||||||
{ link: "https://engine.presearch.org", q: "/search" },
|
|
||||||
{ link: "https://searx.silkky.cloud", q: "/" },
|
|
||||||
{ link: "https://search.trom.tf", q: "/" },
|
|
||||||
{ link: "https://whooglesearch.net", q: "/search" },
|
|
||||||
{ link: "https://whoogle.sdf.org", q: "/search" },
|
|
||||||
{ link: "https://whoogle.himiko.cloud", q: "/search" },
|
|
||||||
{ link: "https://whoogle-search.zeet.app", q: "/search" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
};
|
|
|
@ -1,8 +0,0 @@
|
||||||
const targets = ["translate.google.com", "translate.google.no"];
|
|
||||||
|
|
||||||
const redirects = ["https://translate.metalune.xyz"];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
};
|
|
|
@ -1,49 +0,0 @@
|
||||||
const targets = [
|
|
||||||
"instagram.com",
|
|
||||||
"www.instagram.com",
|
|
||||||
"help.instagram.com",
|
|
||||||
"about.instagram.com",
|
|
||||||
];
|
|
||||||
const redirects = [
|
|
||||||
"https://bibliogram.art",
|
|
||||||
"https://bibliogram.snopyta.org",
|
|
||||||
"https://bibliogram.pussthecat.org",
|
|
||||||
"https://bibliogram.nixnet.services",
|
|
||||||
"https://bibliogram.ethibox.fr",
|
|
||||||
"https://bibliogram.hamster.dance",
|
|
||||||
"https://insta.trom.tf",
|
|
||||||
"https://bib.actionsack.com"
|
|
||||||
];
|
|
||||||
const reservedPaths = [
|
|
||||||
"about",
|
|
||||||
"explore",
|
|
||||||
"support",
|
|
||||||
"press",
|
|
||||||
"api",
|
|
||||||
"privacy",
|
|
||||||
"safety",
|
|
||||||
"admin",
|
|
||||||
"graphql",
|
|
||||||
"accounts",
|
|
||||||
"help",
|
|
||||||
"terms",
|
|
||||||
"contact",
|
|
||||||
"blog",
|
|
||||||
"igtv",
|
|
||||||
"u",
|
|
||||||
"p",
|
|
||||||
"fragment",
|
|
||||||
"imageproxy",
|
|
||||||
"videoproxy",
|
|
||||||
".well-known",
|
|
||||||
"tv",
|
|
||||||
"reel",
|
|
||||||
];
|
|
||||||
const bypassPaths = /\/(accounts\/|embeds?.js)/;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
reservedPaths,
|
|
||||||
bypassPaths,
|
|
||||||
};
|
|
|
@ -1,32 +0,0 @@
|
||||||
const targets = [
|
|
||||||
"www.reddit.com",
|
|
||||||
"np.reddit.com",
|
|
||||||
"new.reddit.com",
|
|
||||||
"amp.reddit.com",
|
|
||||||
"i.redd.it",
|
|
||||||
"redd.it",
|
|
||||||
"old.reddit.com",
|
|
||||||
];
|
|
||||||
const redirects = [
|
|
||||||
// libreddit: privacy w/ modern UI
|
|
||||||
"https://libredd.it",
|
|
||||||
"https://libreddit.spike.codes",
|
|
||||||
"https://libreddit.kavin.rocks",
|
|
||||||
"https://libreddit.insanity.wtf",
|
|
||||||
"https://libreddit.dothq.co",
|
|
||||||
"https://libreddit.silkky.cloud",
|
|
||||||
"https://libreddit.himiko.cloud",
|
|
||||||
"https://reddit.artemislena.eu",
|
|
||||||
// teddit: privacy w/ old UI
|
|
||||||
"https://teddit.net",
|
|
||||||
"https://teddit.ggc-project.de",
|
|
||||||
"https://teddit.kavin.rocks",
|
|
||||||
"https://snew.notabug.io",
|
|
||||||
];
|
|
||||||
const bypassPaths = /\/(gallery\/poll\/rpan\/settings\/topics)/;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
bypassPaths,
|
|
||||||
};
|
|
|
@ -1,44 +0,0 @@
|
||||||
/*
|
|
||||||
Please remember to also update the src/manifest.json file
|
|
||||||
(content_scripts > matches, 'remove-twitter-sw.js')
|
|
||||||
when updating this list:
|
|
||||||
*/
|
|
||||||
const targets = [
|
|
||||||
"twitter.com",
|
|
||||||
"www.twitter.com",
|
|
||||||
"mobile.twitter.com",
|
|
||||||
"pbs.twimg.com",
|
|
||||||
"video.twimg.com",
|
|
||||||
];
|
|
||||||
/*
|
|
||||||
Please remember to also update the
|
|
||||||
src/assets/javascripts/remove-twitter-sw.js file
|
|
||||||
(const nitterInstances) when updating this list:
|
|
||||||
*/
|
|
||||||
const redirects = [
|
|
||||||
"https://nitter.net",
|
|
||||||
"https://nitter.snopyta.org",
|
|
||||||
"https://nitter.42l.fr",
|
|
||||||
"https://nitter.nixnet.services",
|
|
||||||
"https://nitter.pussthecat.org",
|
|
||||||
"https://nitter.dark.fail",
|
|
||||||
"https://nitter.tedomum.net",
|
|
||||||
"https://nitter.cattube.org",
|
|
||||||
"https://nitter.fdn.fr",
|
|
||||||
"https://nitter.1d4.us",
|
|
||||||
"https://nitter.kavin.rocks",
|
|
||||||
"https://tweet.lambda.dance",
|
|
||||||
"https://nitter.cc",
|
|
||||||
"https://nitter.vxempire.xyz",
|
|
||||||
"https://nitter.unixfox.eu",
|
|
||||||
"https://bird.trom.tf",
|
|
||||||
"http://3nzoldnxplag42gqjs23xvghtzf6t6yzssrtytnntc6ppc7xxuoneoad.onion",
|
|
||||||
"http://nitter.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion",
|
|
||||||
"http://nitterlgj3n5fgwesu3vxc5h67ruku33nqaoeoocae2mvlzhsu6k7fqd.onion",
|
|
||||||
"http://npf37k3mtzwxreiw52ccs5ay4e6qt2fkcs2ndieurdyn2cuzzsfyfvid.onion",
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
};
|
|
|
@ -1,8 +0,0 @@
|
||||||
const targets = /wikipedia.org/;
|
|
||||||
|
|
||||||
const redirects = ["https://wikiless.org"];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
};
|
|
|
@ -1,45 +0,0 @@
|
||||||
const targets = [
|
|
||||||
"m.youtube.com",
|
|
||||||
"youtube.com",
|
|
||||||
"img.youtube.com",
|
|
||||||
"www.youtube.com",
|
|
||||||
"youtube-nocookie.com",
|
|
||||||
"www.youtube-nocookie.com",
|
|
||||||
"youtu.be",
|
|
||||||
"s.ytimg.com",
|
|
||||||
"music.youtube.com",
|
|
||||||
];
|
|
||||||
/*
|
|
||||||
Please remember to also update the manifest.json file
|
|
||||||
(content_scripts > matches, 'persist-invidious-prefs.js')
|
|
||||||
when updating this list:
|
|
||||||
*/
|
|
||||||
const redirects = [
|
|
||||||
"https://invidious.snopyta.org",
|
|
||||||
"https://invidious.xyz",
|
|
||||||
"https://invidious.kavin.rocks",
|
|
||||||
"https://tube.connect.cafe",
|
|
||||||
"https://invidious.zapashcanon.fr",
|
|
||||||
"https://invidiou.site",
|
|
||||||
"https://vid.mint.lgbt",
|
|
||||||
"https://invidious.site",
|
|
||||||
"https://yewtu.be",
|
|
||||||
"https://invidious.tube",
|
|
||||||
"https://invidious.silkky.cloud",
|
|
||||||
"https://invidious.himiko.cloud",
|
|
||||||
"https://inv.skyn3t.in",
|
|
||||||
"https://tube.incognet.io",
|
|
||||||
"https://invidious.tinfoil-hat.net",
|
|
||||||
"https://invidious.namazso.eu",
|
|
||||||
"https://vid.puffyan.us",
|
|
||||||
"https://dev.viewtube.io",
|
|
||||||
"https://invidious.048596.xyz",
|
|
||||||
"http://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion",
|
|
||||||
"http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
|
|
||||||
"http://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion",
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
targets,
|
|
||||||
redirects,
|
|
||||||
};
|
|
|
@ -1,35 +0,0 @@
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
function getMessage(tag) {
|
|
||||||
return tag.replace(/__MSG_(\w+)__/g, function (_match, v1) {
|
|
||||||
return v1 ? browser.i18n.getMessage(v1) : null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function localisePage() {
|
|
||||||
let elements = document.querySelectorAll("[data-localise]");
|
|
||||||
|
|
||||||
for (let i in elements)
|
|
||||||
if (elements.hasOwnProperty(i)) {
|
|
||||||
let obj = elements[i];
|
|
||||||
let tag = obj.getAttribute("data-localise").toString();
|
|
||||||
|
|
||||||
let msg = getMessage(tag);
|
|
||||||
|
|
||||||
if (msg && msg !== tag) obj.textContent = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
let placeholders = document.querySelectorAll("[data-localise-placeholder]");
|
|
||||||
|
|
||||||
for (let i in placeholders)
|
|
||||||
if (placeholders.hasOwnProperty(i)) {
|
|
||||||
let obj = placeholders[i];
|
|
||||||
let tag = obj.getAttribute("data-localise-placeholder").toString();
|
|
||||||
|
|
||||||
let msg = getMessage(tag);
|
|
||||||
|
|
||||||
if (msg && msg !== tag) obj.placeholder = msg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
localisePage();
|
|
|
@ -1,186 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const nitterInstances = [
|
|
||||||
"https://nitter.net",
|
|
||||||
"https://nitter.snopyta.org",
|
|
||||||
"https://nitter.42l.fr",
|
|
||||||
"https://nitter.nixnet.services",
|
|
||||||
"https://nitter.pussthecat.org",
|
|
||||||
"https://nitter.dark.fail",
|
|
||||||
"https://nitter.tedomum.net",
|
|
||||||
"https://nitter.cattube.org",
|
|
||||||
"https://nitter.fdn.fr",
|
|
||||||
"https://nitter.1d4.us",
|
|
||||||
"https://nitter.kavin.rocks",
|
|
||||||
"https://tweet.lambda.dance",
|
|
||||||
"https://nitter.cc",
|
|
||||||
"https://nitter.vxempire.xyz",
|
|
||||||
"https://nitter.unixfox.eu",
|
|
||||||
"https://bird.trom.tf"
|
|
||||||
];
|
|
||||||
|
|
||||||
let disableNitter;
|
|
||||||
let nitterInstance;
|
|
||||||
let redirectBypassFlag;
|
|
||||||
let exceptions;
|
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
function getRandomInstance() {
|
|
||||||
return nitterInstances[~~(nitterInstances.length * Math.random())];
|
|
||||||
}
|
|
||||||
|
|
||||||
function isNotException(url) {
|
|
||||||
return !exceptions.some((regex) => regex.test(url.href));
|
|
||||||
}
|
|
||||||
|
|
||||||
function shouldRedirect(url) {
|
|
||||||
return (
|
|
||||||
!redirectBypassFlag &&
|
|
||||||
isNotException(url) &&
|
|
||||||
!disableNitter &&
|
|
||||||
url.host !== nitterInstance &&
|
|
||||||
!url.pathname.includes("/home")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectTwitter(url) {
|
|
||||||
if (url.host.split(".")[0] === "pbs") {
|
|
||||||
return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
|
|
||||||
} else if (url.host.split(".")[0] === "video") {
|
|
||||||
return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
|
|
||||||
} else {
|
|
||||||
return `${nitterInstance}${url.pathname}${url.search}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
browser.storage.sync.get(
|
|
||||||
[
|
|
||||||
"nitterInstance",
|
|
||||||
"disableNitter",
|
|
||||||
"removeTwitterSW",
|
|
||||||
"redirectBypassFlag",
|
|
||||||
"exceptions",
|
|
||||||
],
|
|
||||||
(result) => {
|
|
||||||
redirectBypassFlag = result.redirectBypassFlag;
|
|
||||||
browser.storage.sync.set({
|
|
||||||
redirectBypassFlag: false,
|
|
||||||
});
|
|
||||||
if (!result.removeTwitterSW) {
|
|
||||||
disableNitter = result.disableNitter;
|
|
||||||
nitterInstance = result.nitterInstance || getRandomInstance();
|
|
||||||
exceptions = result.exceptions
|
|
||||||
? result.exceptions.map((e) => {
|
|
||||||
return new RegExp(e);
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
|
||||||
for (let registration of registrations) {
|
|
||||||
if (registration.scope === "https://twitter.com/") {
|
|
||||||
registration.unregister();
|
|
||||||
console.log("Unregistered Twitter SW", registration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const url = new URL(window.location);
|
|
||||||
if (shouldRedirect(url)) {
|
|
||||||
const redirect = redirectTwitter(url);
|
|
||||||
console.info("Redirecting", `"${url.href}"`, "=>", `"${redirect}"`);
|
|
||||||
window.location = redirect;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Keeping this here until https://bugzilla.mozilla.org/show_bug.cgi?id=1536094 is fixed...
|
|
||||||
//
|
|
||||||
//"use strict";
|
|
||||||
//
|
|
||||||
//let disableNitter;
|
|
||||||
//let nitterInstance;
|
|
||||||
//let redirectBypassFlag;
|
|
||||||
//let exceptions;
|
|
||||||
//
|
|
||||||
//window.browser = window.browser || window.chrome;
|
|
||||||
//
|
|
||||||
//Promise.all([
|
|
||||||
// import(browser.extension.getURL("src/assets/javascripts/helpers/common.js")),
|
|
||||||
// import(browser.extension.getURL("src/assets/javascripts/helpers/twitter.js")),
|
|
||||||
//]).then(
|
|
||||||
// (helpers) => {
|
|
||||||
// let commonHelper;
|
|
||||||
// let twitterHelper;
|
|
||||||
// [commonHelper, twitterHelper] = helpers;
|
|
||||||
//
|
|
||||||
// function isNotException(url) {
|
|
||||||
// return !exceptions.some((regex) => regex.test(url.href));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// function shouldRedirect(url) {
|
|
||||||
// return (
|
|
||||||
// !redirectBypassFlag &&
|
|
||||||
// isNotException(url) &&
|
|
||||||
// !disableNitter &&
|
|
||||||
// url.host !== nitterInstance &&
|
|
||||||
// !url.pathname.includes("/home")
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// function redirectTwitter(url) {
|
|
||||||
// if (url.host.split(".")[0] === "pbs") {
|
|
||||||
// return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
|
|
||||||
// } else if (url.host.split(".")[0] === "video") {
|
|
||||||
// return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
|
|
||||||
// } else {
|
|
||||||
// return `${nitterInstance}${url.pathname}${url.search}`;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// browser.storage.sync.get(
|
|
||||||
// [
|
|
||||||
// "nitterInstance",
|
|
||||||
// "disableNitter",
|
|
||||||
// "removeTwitterSW",
|
|
||||||
// "redirectBypassFlag",
|
|
||||||
// "exceptions",
|
|
||||||
// ],
|
|
||||||
// (result) => {
|
|
||||||
// redirectBypassFlag = result.redirectBypassFlag;
|
|
||||||
// browser.storage.sync.set({
|
|
||||||
// redirectBypassFlag: false,
|
|
||||||
// });
|
|
||||||
// if (!result.removeTwitterSW) {
|
|
||||||
// disableNitter = result.disableNitter;
|
|
||||||
// nitterInstance =
|
|
||||||
// result.nitterInstance ||
|
|
||||||
// commonHelper.default.getRandomInstance(
|
|
||||||
// twitterHelper.default.redirects
|
|
||||||
// );
|
|
||||||
// exceptions = result.exceptions
|
|
||||||
// ? result.exceptions.map((e) => {
|
|
||||||
// return new RegExp(e);
|
|
||||||
// })
|
|
||||||
// : [];
|
|
||||||
// navigator.serviceWorker.getRegistrations().then((registrations) => {
|
|
||||||
// for (let registration of registrations) {
|
|
||||||
// if (registration.scope === "https://twitter.com/") {
|
|
||||||
// registration.unregister();
|
|
||||||
// console.log("Unregistered Twitter SW", registration);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// const url = new URL(window.location);
|
|
||||||
// if (shouldRedirect(url)) {
|
|
||||||
// const redirect = redirectTwitter(url);
|
|
||||||
// console.info("Redirecting", `"${url.href}"`, "=>", `"${redirect}"`);
|
|
||||||
// window.location = redirect;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// (error) => {
|
|
||||||
// console.error(error);
|
|
||||||
// }
|
|
||||||
//);
|
|
|
@ -1,7 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<script type="module" src="background.js"></script>
|
|
||||||
</head>
|
|
||||||
</html>
|
|
|
@ -1,682 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import commonHelper from "../../assets/javascripts/helpers/common.js";
|
|
||||||
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
|
|
||||||
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
|
|
||||||
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
|
|
||||||
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
|
|
||||||
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
|
|
||||||
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
|
|
||||||
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
|
|
||||||
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
|
|
||||||
|
|
||||||
const nitterInstances = twitterHelper.redirects;
|
|
||||||
const twitterDomains = twitterHelper.targets;
|
|
||||||
const youtubeDomains = youtubeHelper.targets;
|
|
||||||
const invidiousInstances = youtubeHelper.redirects;
|
|
||||||
const instagramDomains = instagramHelper.targets;
|
|
||||||
const bibliogramInstances = instagramHelper.redirects;
|
|
||||||
const instagramReservedPaths = instagramHelper.reservedPaths;
|
|
||||||
const bibliogramBypassPaths = instagramHelper.bypassPaths;
|
|
||||||
const osmDefault = mapsHelper.redirects[0];
|
|
||||||
const googleMapsRegex = mapsHelper.targets;
|
|
||||||
const mapCentreRegex = mapsHelper.mapCentreRegex;
|
|
||||||
const dataLatLngRegex = mapsHelper.dataLatLngRegex;
|
|
||||||
const placeRegex = mapsHelper.placeRegex;
|
|
||||||
const travelModes = mapsHelper.travelModes;
|
|
||||||
const layers = mapsHelper.layers;
|
|
||||||
const redditInstances = redditHelper.redirects;
|
|
||||||
const redditDomains = redditHelper.targets;
|
|
||||||
const redditBypassPaths = redditHelper.bypassPaths;
|
|
||||||
const redditDefault = redditHelper.redirects[0];
|
|
||||||
const googleSearchRegex = searchHelper.targets;
|
|
||||||
const searchEngineInstances = searchHelper.redirects;
|
|
||||||
const simplyTranslateInstances = googleTranslateHelper.redirects;
|
|
||||||
const simplyTranslateDefault = simplyTranslateInstances[0];
|
|
||||||
const googleTranslateDomains = googleTranslateHelper.targets;
|
|
||||||
const wikipediaInstances = wikipediaHelper.redirects;
|
|
||||||
const wikipediaDefault = wikipediaInstances[0];
|
|
||||||
const wikipediaRegex = wikipediaHelper.targets;
|
|
||||||
|
|
||||||
let disableNitter;
|
|
||||||
let disableInvidious;
|
|
||||||
let disableBibliogram;
|
|
||||||
let disableOsm;
|
|
||||||
let disableReddit;
|
|
||||||
let disableSearchEngine;
|
|
||||||
let disableSimplyTranslate;
|
|
||||||
let disableWikipedia;
|
|
||||||
let nitterInstance;
|
|
||||||
let invidiousInstance;
|
|
||||||
let bibliogramInstance;
|
|
||||||
let osmInstance;
|
|
||||||
let redditInstance;
|
|
||||||
let searchEngineInstance;
|
|
||||||
let simplyTranslateInstance;
|
|
||||||
let wikipediaInstance;
|
|
||||||
let alwaysProxy;
|
|
||||||
let onlyEmbeddedVideo;
|
|
||||||
let videoQuality;
|
|
||||||
let invidiousDarkMode;
|
|
||||||
let invidiousVolume;
|
|
||||||
let invidiousPlayerStyle;
|
|
||||||
let invidiousSubtitles;
|
|
||||||
let invidiousAutoplay;
|
|
||||||
let useFreeTube;
|
|
||||||
let nitterRandomPool;
|
|
||||||
let invidiousRandomPool;
|
|
||||||
let bibliogramRandomPool;
|
|
||||||
let exceptions;
|
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
browser.storage.sync.get(
|
|
||||||
[
|
|
||||||
"nitterInstance",
|
|
||||||
"invidiousInstance",
|
|
||||||
"bibliogramInstance",
|
|
||||||
"osmInstance",
|
|
||||||
"redditInstance",
|
|
||||||
"searchEngineInstance",
|
|
||||||
"simplyTranslateInstance",
|
|
||||||
"wikipediaInstance",
|
|
||||||
"disableNitter",
|
|
||||||
"disableInvidious",
|
|
||||||
"disableBibliogram",
|
|
||||||
"disableOsm",
|
|
||||||
"disableReddit",
|
|
||||||
"disableSearchEngine",
|
|
||||||
"disableSimplyTranslate",
|
|
||||||
"disableWikipedia",
|
|
||||||
"alwaysProxy",
|
|
||||||
"onlyEmbeddedVideo",
|
|
||||||
"videoQuality",
|
|
||||||
"invidiousDarkMode",
|
|
||||||
"invidiousVolume",
|
|
||||||
"invidiousPlayerStyle",
|
|
||||||
"invidiousSubtitles",
|
|
||||||
"invidiousAutoplay",
|
|
||||||
"useFreeTube",
|
|
||||||
"nitterRandomPool",
|
|
||||||
"invidiousRandomPool",
|
|
||||||
"bibliogramRandomPool",
|
|
||||||
"exceptions",
|
|
||||||
],
|
|
||||||
(result) => {
|
|
||||||
nitterInstance = result.nitterInstance;
|
|
||||||
invidiousInstance = result.invidiousInstance;
|
|
||||||
bibliogramInstance = result.bibliogramInstance;
|
|
||||||
osmInstance = result.osmInstance || osmDefault;
|
|
||||||
redditInstance = result.redditInstance || redditDefault;
|
|
||||||
searchEngineInstance = result.searchEngineInstance;
|
|
||||||
simplyTranslateInstance =
|
|
||||||
result.simplyTranslateInstance || simplyTranslateDefault;
|
|
||||||
wikipediaInstance = result.wikipediaInstance || wikipediaDefault;
|
|
||||||
disableNitter = result.disableNitter;
|
|
||||||
disableInvidious = result.disableInvidious;
|
|
||||||
disableBibliogram = result.disableBibliogram;
|
|
||||||
disableOsm = result.disableOsm;
|
|
||||||
disableReddit = result.disableReddit;
|
|
||||||
disableSearchEngine = result.disableSearchEngine;
|
|
||||||
disableWikipedia = result.disableWikipedia;
|
|
||||||
disableSimplyTranslate = result.disableSimplyTranslate;
|
|
||||||
alwaysProxy = result.alwaysProxy;
|
|
||||||
onlyEmbeddedVideo = result.onlyEmbeddedVideo;
|
|
||||||
videoQuality = result.videoQuality;
|
|
||||||
invidiousDarkMode = result.invidiousDarkMode;
|
|
||||||
exceptions = result.exceptions
|
|
||||||
? result.exceptions.map((e) => {
|
|
||||||
return new RegExp(e);
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
invidiousVolume = result.invidiousVolume;
|
|
||||||
invidiousPlayerStyle = result.invidiousPlayerStyle;
|
|
||||||
invidiousSubtitles = result.invidiousSubtitles || "";
|
|
||||||
invidiousAutoplay = result.invidiousAutoplay;
|
|
||||||
useFreeTube = result.useFreeTube;
|
|
||||||
nitterRandomPool = result.nitterRandomPool
|
|
||||||
? result.nitterRandomPool.split(",")
|
|
||||||
: commonHelper.filterInstances(nitterInstances);
|
|
||||||
invidiousRandomPool = result.invidiousRandomPool
|
|
||||||
? result.invidiousRandomPool.split(",")
|
|
||||||
: commonHelper.filterInstances(invidiousInstances);
|
|
||||||
bibliogramRandomPool = result.bibliogramRandomPool
|
|
||||||
? result.bibliogramRandomPool.split(",")
|
|
||||||
: commonHelper.filterInstances(bibliogramInstances);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
browser.storage.onChanged.addListener((changes) => {
|
|
||||||
if ("nitterInstance" in changes) {
|
|
||||||
nitterInstance = changes.nitterInstance.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousInstance" in changes) {
|
|
||||||
invidiousInstance = changes.invidiousInstance.newValue;
|
|
||||||
}
|
|
||||||
if ("bibliogramInstance" in changes) {
|
|
||||||
bibliogramInstance = changes.bibliogramInstance.newValue;
|
|
||||||
}
|
|
||||||
if ("osmInstance" in changes) {
|
|
||||||
osmInstance = changes.osmInstance.newValue || osmDefault;
|
|
||||||
}
|
|
||||||
if ("simplyTranslateInstance" in changes) {
|
|
||||||
simplyTranslateInstance =
|
|
||||||
changes.simplyTranslateInstance.newValue || simplyTranslateDefault;
|
|
||||||
}
|
|
||||||
if ("wikipediaInstance" in changes) {
|
|
||||||
wikipediaInstance = changes.wikipediaInstance.newValue || wikipediaDefault;
|
|
||||||
}
|
|
||||||
if ("redditInstance" in changes) {
|
|
||||||
redditInstance = changes.redditInstance.newValue || redditDefault;
|
|
||||||
}
|
|
||||||
if ("searchEngineInstance" in changes) {
|
|
||||||
searchEngineInstance = changes.searchEngineInstance.newValue;
|
|
||||||
}
|
|
||||||
if ("disableNitter" in changes) {
|
|
||||||
disableNitter = changes.disableNitter.newValue;
|
|
||||||
}
|
|
||||||
if ("disableInvidious" in changes) {
|
|
||||||
disableInvidious = changes.disableInvidious.newValue;
|
|
||||||
}
|
|
||||||
if ("disableBibliogram" in changes) {
|
|
||||||
disableBibliogram = changes.disableBibliogram.newValue;
|
|
||||||
}
|
|
||||||
if ("disableOsm" in changes) {
|
|
||||||
disableOsm = changes.disableOsm.newValue;
|
|
||||||
}
|
|
||||||
if ("disableReddit" in changes) {
|
|
||||||
disableReddit = changes.disableReddit.newValue;
|
|
||||||
}
|
|
||||||
if ("disableSearchEngine" in changes) {
|
|
||||||
disableSearchEngine = changes.disableSearchEngine.newValue;
|
|
||||||
}
|
|
||||||
if ("disableSimplyTranslate" in changes) {
|
|
||||||
disableSimplyTranslate = changes.disableSimplyTranslate.newValue;
|
|
||||||
}
|
|
||||||
if ("disableWikipedia" in changes) {
|
|
||||||
disableWikipedia = changes.disableWikipedia.newValue;
|
|
||||||
}
|
|
||||||
if ("alwaysProxy" in changes) {
|
|
||||||
alwaysProxy = changes.alwaysProxy.newValue;
|
|
||||||
}
|
|
||||||
if ("onlyEmbeddedVideo" in changes) {
|
|
||||||
onlyEmbeddedVideo = changes.onlyEmbeddedVideo.newValue;
|
|
||||||
}
|
|
||||||
if ("videoQuality" in changes) {
|
|
||||||
videoQuality = changes.videoQuality.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousDarkMode" in changes) {
|
|
||||||
invidiousDarkMode = changes.invidiousDarkMode.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousVolume" in changes) {
|
|
||||||
invidiousVolume = changes.invidiousVolume.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousPlayerStyle" in changes) {
|
|
||||||
invidiousPlayerStyle = changes.invidiousPlayerStyle.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousSubtitles" in changes) {
|
|
||||||
invidiousSubtitles = changes.invidiousSubtitles.newValue;
|
|
||||||
}
|
|
||||||
if ("invidiousAutoplay" in changes) {
|
|
||||||
invidiousAutoplay = changes.invidiousAutoplay.newValue;
|
|
||||||
}
|
|
||||||
if ("useFreeTube" in changes) {
|
|
||||||
useFreeTube = changes.useFreeTube.newValue;
|
|
||||||
}
|
|
||||||
if ("nitterRandomPool" in changes) {
|
|
||||||
nitterRandomPool = changes.nitterRandomPool.newValue.split(",");
|
|
||||||
}
|
|
||||||
if ("invidiousRandomPool" in changes) {
|
|
||||||
invidiousRandomPool = changes.invidiousRandomPool.newValue.split(",");
|
|
||||||
}
|
|
||||||
if ("bibliogramRandomPool" in changes) {
|
|
||||||
bibliogramRandomPool = changes.bibliogramRandomPool.newValue.split(",");
|
|
||||||
}
|
|
||||||
if ("exceptions" in changes) {
|
|
||||||
exceptions = changes.exceptions.newValue.map((e) => {
|
|
||||||
return new RegExp(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function isException(url, initiator) {
|
|
||||||
return (
|
|
||||||
exceptions.some((regex) => regex.test(url.href)) ||
|
|
||||||
(initiator && exceptions.some((regex) => regex.test(initiator.href)))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isFirefox() {
|
|
||||||
return typeof InstallTrigger !== "undefined";
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectYouTube(url, initiator, type) {
|
|
||||||
if (disableInvidious || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
initiator &&
|
|
||||||
(initiator.origin === invidiousInstance ||
|
|
||||||
invidiousInstances.includes(initiator.origin) ||
|
|
||||||
youtubeDomains.includes(initiator.host))
|
|
||||||
) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (url.pathname.match(/iframe_api/) || url.pathname.match(/www-widgetapi/)) {
|
|
||||||
// Don't redirect YouTube Player API.
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (url.host.split(".")[0] === "studio") {
|
|
||||||
// Avoid redirecting `studio.youtube.com`
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (onlyEmbeddedVideo && type !== "sub_frame") {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (useFreeTube && type === "main_frame") {
|
|
||||||
return `freetube://${url}`;
|
|
||||||
}
|
|
||||||
// Apply settings
|
|
||||||
if (alwaysProxy) {
|
|
||||||
url.searchParams.append("local", true);
|
|
||||||
}
|
|
||||||
if (videoQuality) {
|
|
||||||
url.searchParams.append("quality", videoQuality);
|
|
||||||
}
|
|
||||||
if (invidiousDarkMode) {
|
|
||||||
url.searchParams.append("dark_mode", invidiousDarkMode);
|
|
||||||
}
|
|
||||||
if (invidiousVolume) {
|
|
||||||
url.searchParams.append("volume", invidiousVolume);
|
|
||||||
}
|
|
||||||
if (invidiousPlayerStyle) {
|
|
||||||
url.searchParams.append("player_style", invidiousPlayerStyle);
|
|
||||||
}
|
|
||||||
if (invidiousSubtitles) {
|
|
||||||
url.searchParams.append("subtitles", invidiousSubtitles);
|
|
||||||
}
|
|
||||||
if (invidiousAutoplay) {
|
|
||||||
url.searchParams.append("autoplay", 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${
|
|
||||||
invidiousInstance || commonHelper.getRandomInstance(invidiousRandomPool)
|
|
||||||
}${url.pathname.replace("/shorts", "")}${url.search}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectTwitter(url, initiator) {
|
|
||||||
if (disableNitter || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (url.pathname.split("/").includes("home")) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
isFirefox() &&
|
|
||||||
initiator &&
|
|
||||||
(initiator.origin === nitterInstance ||
|
|
||||||
nitterInstances.includes(initiator.origin) ||
|
|
||||||
twitterDomains.includes(initiator.host))
|
|
||||||
) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
redirectBypassFlag: true,
|
|
||||||
});
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") {
|
|
||||||
return `${
|
|
||||||
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
|
|
||||||
}/pic/${encodeURIComponent(url.href)}`;
|
|
||||||
} else if (url.pathname.split("/").includes("tweets")) {
|
|
||||||
return `${
|
|
||||||
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
|
|
||||||
}${url.pathname.replace("/tweets", "")}${url.search}`;
|
|
||||||
} else {
|
|
||||||
return `${
|
|
||||||
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
|
|
||||||
}${url.pathname}${url.search}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectInstagram(url, initiator, type) {
|
|
||||||
if (disableBibliogram || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// Do not redirect Bibliogram view on Instagram links
|
|
||||||
if (
|
|
||||||
initiator &&
|
|
||||||
(initiator.origin === bibliogramInstance ||
|
|
||||||
bibliogramInstances.includes(initiator.origin) ||
|
|
||||||
instagramDomains.includes(initiator.host))
|
|
||||||
) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// Do not redirect /accounts, /embeds.js, or anything other than main_frame
|
|
||||||
if (type !== "main_frame" || url.pathname.match(bibliogramBypassPaths)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
url.pathname === "/" ||
|
|
||||||
instagramReservedPaths.includes(url.pathname.split("/")[1])
|
|
||||||
) {
|
|
||||||
return `${
|
|
||||||
bibliogramInstance || commonHelper.getRandomInstance(bibliogramRandomPool)
|
|
||||||
}${url.pathname}${url.search}`;
|
|
||||||
} else {
|
|
||||||
// Likely a user profile, redirect to '/u/...'
|
|
||||||
return `${
|
|
||||||
bibliogramInstance || commonHelper.getRandomInstance(bibliogramRandomPool)
|
|
||||||
}/u${url.pathname}${url.search}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectGoogleMaps(url, initiator) {
|
|
||||||
if (disableOsm || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (initiator.host === "earth.google.com") {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
let redirect;
|
|
||||||
let mapCentre = "";
|
|
||||||
let params = "";
|
|
||||||
// Set map centre if present
|
|
||||||
if (url.pathname.match(mapCentreRegex)) {
|
|
||||||
const [, lat, lon, zoom] = url.pathname.match(mapCentreRegex);
|
|
||||||
mapCentre = `#map=${zoom}/${lat}/${lon}`;
|
|
||||||
} else if (url.search.includes("center=")) {
|
|
||||||
const [lat, lon] = url.searchParams.get("center").split(",");
|
|
||||||
mapCentre = `#map=${url.searchParams.get("zoom") || "17"}/${lat}/${lon}`;
|
|
||||||
// Set default zoom if mapCentre not present
|
|
||||||
} else {
|
|
||||||
params = "&zoom=17";
|
|
||||||
}
|
|
||||||
// Set map layer
|
|
||||||
params = `${params}&layers=${
|
|
||||||
layers[url.searchParams.get("layer")] || layers["none"]
|
|
||||||
}`;
|
|
||||||
// Handle Google Maps Embed API
|
|
||||||
if (url.pathname.split("/").includes("embed")) {
|
|
||||||
let query = "";
|
|
||||||
if (url.searchParams.has("q")) {
|
|
||||||
query = url.searchParams.get("q");
|
|
||||||
} else if (url.searchParams.has("query")) {
|
|
||||||
query = url.searchParams.has("query");
|
|
||||||
} else if (url.searchParams.has("pb")) {
|
|
||||||
try {
|
|
||||||
query = url.searchParams.get("pb").split(/!2s(.*?)!/)[1];
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
// Unable to find map marker in URL.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let marker, bbox;
|
|
||||||
mapsHelper.addressToLatLng(query, (coords, boundingbox) => {
|
|
||||||
marker = coords;
|
|
||||||
bbox = boundingbox;
|
|
||||||
});
|
|
||||||
redirect = `${osmInstance}/export/embed.html?bbox=${bbox}&layer=mapnik&marker=${marker}`;
|
|
||||||
// Handle Google Maps Directions
|
|
||||||
} else if (url.pathname.split("/").includes("dir")) {
|
|
||||||
const travelMode =
|
|
||||||
travelModes[url.searchParams.get("travelmode")] || travelModes["driving"];
|
|
||||||
let origin;
|
|
||||||
mapsHelper.addressToLatLng(url.searchParams.get("origin"), (coords) => {
|
|
||||||
origin = coords;
|
|
||||||
});
|
|
||||||
let destination;
|
|
||||||
mapsHelper.addressToLatLng(
|
|
||||||
url.searchParams.get("destination"),
|
|
||||||
(coords) => {
|
|
||||||
destination = coords;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
redirect = `${osmInstance}/directions?engine=${travelMode}&route=${origin}%3B${destination}${mapCentre}${params}`;
|
|
||||||
// Get marker from data attribute
|
|
||||||
} else if (
|
|
||||||
url.pathname.includes("data=") &&
|
|
||||||
url.pathname.match(dataLatLngRegex)
|
|
||||||
) {
|
|
||||||
const [mlat, mlon] = url.pathname.match(dataLatLngRegex);
|
|
||||||
redirect = `${osmInstance}/?mlat=${mlat.replace(
|
|
||||||
"!3d",
|
|
||||||
""
|
|
||||||
)}&mlon=${mlon.replace("!4d", "")}${mapCentre}${params}`;
|
|
||||||
// Get marker from ll param
|
|
||||||
} else if (url.searchParams.has("ll")) {
|
|
||||||
const [mlat, mlon] = url.searchParams.get("ll").split(",");
|
|
||||||
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
|
|
||||||
// Get marker from viewpoint param.
|
|
||||||
} else if (url.searchParams.has("viewpoint")) {
|
|
||||||
const [mlat, mlon] = url.searchParams.get("viewpoint").split(",");
|
|
||||||
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
|
|
||||||
// Use query as search if present.
|
|
||||||
} else {
|
|
||||||
let query;
|
|
||||||
if (url.searchParams.has("q")) {
|
|
||||||
query = url.searchParams.get("q");
|
|
||||||
} else if (url.searchParams.has("query")) {
|
|
||||||
query = url.searchParams.get("query");
|
|
||||||
} else if (url.pathname.match(placeRegex)) {
|
|
||||||
query = url.pathname.match(placeRegex)[1];
|
|
||||||
}
|
|
||||||
redirect = `${osmInstance}/${query ? "search?query=" + query : ""}${
|
|
||||||
mapCentre || "#"
|
|
||||||
}${params}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect;
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectReddit(url, initiator, type) {
|
|
||||||
if (disableReddit || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// Do not redirect when already on the selected view
|
|
||||||
if (
|
|
||||||
(initiator && initiator.origin === redditInstance) ||
|
|
||||||
url.origin === redditInstance
|
|
||||||
) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// Do not redirect exclusions nor anything other than main_frame
|
|
||||||
if (type !== "main_frame" || url.pathname.match(redditBypassPaths)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (url.host === "i.redd.it") {
|
|
||||||
if (redditInstance.includes("libredd")) {
|
|
||||||
return `${redditInstance}/img${url.pathname}${url.search}`;
|
|
||||||
} else if (redditInstance.includes("teddit")) {
|
|
||||||
// As of 2021-04-09, redirects for teddit images are nontrivial:
|
|
||||||
// - navigating to the image before ever navigating to its page causes
|
|
||||||
// 404 error (probably needs fix on teddit project)
|
|
||||||
// - some image links on teddit are very different
|
|
||||||
// Therefore, don't support redirecting image links for teddit.
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else if (url.host === "redd.it") {
|
|
||||||
if (
|
|
||||||
redditInstance.includes("teddit") &&
|
|
||||||
!url.pathname.match(/^\/+[^\/]+\/+[^\/]/)
|
|
||||||
) {
|
|
||||||
// As of 2021-04-22, redirects for teddit redd.it/foo links don't work.
|
|
||||||
// It appears that adding "/comments" as a prefix works, so manually add
|
|
||||||
// that prefix if it is missing. Even though redd.it/comments/foo links
|
|
||||||
// don't seem to work or exist, guard against affecting those kinds of
|
|
||||||
// paths.
|
|
||||||
//
|
|
||||||
// Note the difference between redd.it/comments/foo (doesn't work) and
|
|
||||||
// teddit.net/comments/foo (works).
|
|
||||||
return `${redditInstance}/comments${url.pathname}${url.search}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return `${redditInstance}${url.pathname}${url.search}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectSearchEngine(url, initiator) {
|
|
||||||
if (disableSearchEngine || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchEngine =
|
|
||||||
searchEngineInstance ||
|
|
||||||
commonHelper.getRandomInstance(searchEngineInstances);
|
|
||||||
let search = "";
|
|
||||||
url.search
|
|
||||||
.slice(1)
|
|
||||||
.split("&")
|
|
||||||
.forEach(function (input) {
|
|
||||||
if (input.startsWith("q=")) search = input;
|
|
||||||
});
|
|
||||||
return `${searchEngine.link}${searchEngine.q}?${search}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectGoogleTranslate(url, initiator) {
|
|
||||||
if (disableSimplyTranslate || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${simplyTranslateInstance}/${url.search}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirectWikipedia(url, initiator) {
|
|
||||||
if (disableWikipedia || isException(url, initiator)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
let GETArguments = [];
|
|
||||||
if (url.search.length > 0) {
|
|
||||||
let search = url.search.substring(1); //get rid of '?'
|
|
||||||
let argstrings = search.split("&");
|
|
||||||
for (let i = 0; i < argstrings.length; i++) {
|
|
||||||
let args = argstrings[i].split("=");
|
|
||||||
GETArguments.push([args[0], args[1]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let link = `${wikipediaInstance}${url.pathname}`;
|
|
||||||
let urlSplit = url.host.split(".");
|
|
||||||
if (urlSplit[0] != "wikipedia" && urlSplit[0] != "www") {
|
|
||||||
if (urlSplit[0] == "m")
|
|
||||||
GETArguments.push(["mobileaction", "toggle_view_mobile"]);
|
|
||||||
else GETArguments.push(["lang", urlSplit[0]]);
|
|
||||||
if (urlSplit[1] == "m")
|
|
||||||
GETArguments.push(["mobileaction", "toggle_view_mobile"]);
|
|
||||||
//wikiless doesn't have mobile view support yet
|
|
||||||
}
|
|
||||||
for (let i = 0; i < GETArguments.length; i++) {
|
|
||||||
link +=
|
|
||||||
(i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1];
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
urlSplit[urlSplit.length - 1] == "org" &&
|
|
||||||
urlSplit[urlSplit.length - 2] == "wikipedia"
|
|
||||||
)
|
|
||||||
//just in case someone wanted to visit wikipedia.org.foo.bar.net
|
|
||||||
return link;
|
|
||||||
else return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
browser.webRequest.onBeforeRequest.addListener(
|
|
||||||
(details) => {
|
|
||||||
const url = new URL(details.url);
|
|
||||||
let initiator;
|
|
||||||
if (details.originUrl) {
|
|
||||||
initiator = new URL(details.originUrl);
|
|
||||||
} else if (details.initiator) {
|
|
||||||
initiator = new URL(details.initiator);
|
|
||||||
}
|
|
||||||
let redirect;
|
|
||||||
if (youtubeDomains.includes(url.host)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectYouTube(url, initiator, details.type),
|
|
||||||
};
|
|
||||||
} else if (twitterDomains.includes(url.host)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectTwitter(url, initiator),
|
|
||||||
};
|
|
||||||
} else if (instagramDomains.includes(url.host)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectInstagram(url, initiator, details.type),
|
|
||||||
};
|
|
||||||
} else if (url.href.match(googleMapsRegex)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectGoogleMaps(url, initiator),
|
|
||||||
};
|
|
||||||
} else if (redditDomains.includes(url.host)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectReddit(url, initiator, details.type),
|
|
||||||
};
|
|
||||||
} else if (url.href.match(googleSearchRegex)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectSearchEngine(url, initiator),
|
|
||||||
};
|
|
||||||
} else if (googleTranslateDomains.includes(url.host)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectGoogleTranslate(url, initiator),
|
|
||||||
};
|
|
||||||
} else if (url.host.match(wikipediaRegex)) {
|
|
||||||
redirect = {
|
|
||||||
redirectUrl: redirectWikipedia(url, initiator),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (redirect && redirect.redirectUrl) {
|
|
||||||
console.info(
|
|
||||||
"Redirecting",
|
|
||||||
`"${url.href}"`,
|
|
||||||
"=>",
|
|
||||||
`"${redirect.redirectUrl}"`
|
|
||||||
);
|
|
||||||
console.info("Details", details);
|
|
||||||
}
|
|
||||||
return redirect;
|
|
||||||
},
|
|
||||||
{
|
|
||||||
urls: ["<all_urls>"],
|
|
||||||
},
|
|
||||||
["blocking"]
|
|
||||||
);
|
|
||||||
|
|
||||||
browser.runtime.onInstalled.addListener((details) => {
|
|
||||||
browser.storage.sync.get(
|
|
||||||
["disableSearchEngine", "disableSimplyTranslate", "disableWikipedia"],
|
|
||||||
(result) => {
|
|
||||||
if (result.disableSearchEngine === undefined) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
disableSearchEngine: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (result.disableSimplyTranslate === undefined) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
disableSimplyTranslate: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (result.disableWikipedia === undefined) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
disableWikipedia: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if (details.reason === "update") {
|
|
||||||
browser.storage.sync.get(
|
|
||||||
["whitelist", "exceptions", "invidiousInstance", "disableSearchEngine"],
|
|
||||||
(result) => {
|
|
||||||
if (result.whitelist) {
|
|
||||||
let whitelist = result.whitelist.map((e) =>
|
|
||||||
e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
|
|
||||||
);
|
|
||||||
browser.storage.sync.set({
|
|
||||||
exceptions: result.exceptions.concat(whitelist),
|
|
||||||
whitelist: null,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (result.invidiousInstance === "https://invidio.us") {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
invidiousInstance: null,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,647 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title></title>
|
|
||||||
<link href="../../assets/stylesheets/styles.css" rel="stylesheet" />
|
|
||||||
<title>Privacy Redirect Options</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="tab">
|
|
||||||
<button
|
|
||||||
class="tablinks"
|
|
||||||
id="general-tab"
|
|
||||||
data-localise="__MSG_generalTab__"
|
|
||||||
>
|
|
||||||
General
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="tablinks"
|
|
||||||
id="advanced-tab"
|
|
||||||
data-localise="__MSG_advancedTab__"
|
|
||||||
>
|
|
||||||
Advanced
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="tablinks"
|
|
||||||
id="exceptions-tab"
|
|
||||||
data-localise="__MSG_exceptionsTab__"
|
|
||||||
>
|
|
||||||
Exceptions
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="general" class="tabcontent">
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Nitter redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableNitter__">Nitter Redirects</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-nitter"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-nitter" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Invidious redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableInvidious__">
|
|
||||||
Invidious Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-invidious"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-invidious" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Bibliogram redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableBibliogram__">
|
|
||||||
Bibliogram Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-bibliogram"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-bibliogram" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle OpenStreetMap redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableOsm__">
|
|
||||||
OpenStreetMap Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-osm"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-osm" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Reddit redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableReddit__">
|
|
||||||
Reddit Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-reddit"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-reddit" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Search Engine redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableSearchEngine__">
|
|
||||||
Search Engine Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-search-engine"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-search-engine" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle SimplyTranslate redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableSimplyTranslate__">SimplyTranslate Redirects</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-simply-translate"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label for="disable-simply-translate" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Wikipedia redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableWikipedia__" class="new-badge" data-new-badge>Wikipedia Redirects</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-wikipedia"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label for="disable-wikipedia" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_nitterInstance__">Nitter Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="nitter-instance"
|
|
||||||
type="url"
|
|
||||||
name="nitter-instance"
|
|
||||||
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
|
|
||||||
placeholder="Random instance (none selected)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_invidiousInstance__">Invidious Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="invidious-instance"
|
|
||||||
type="url"
|
|
||||||
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
|
|
||||||
placeholder="Random instance (none selected)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_bibliogramInstance__">Bibliogram Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="bibliogram-instance"
|
|
||||||
type="url"
|
|
||||||
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
|
|
||||||
placeholder="Random instance (none selected)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_osmInstance__">OpenStreetMap Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="osm-instance"
|
|
||||||
type="url"
|
|
||||||
placeholder="https://openstreetmap.org"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_redditInstance__">Reddit Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="reddit-instance"
|
|
||||||
type="url"
|
|
||||||
placeholder="https://libredd.it"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_searchEngineInstance__">Search Engine Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="search-engine-instance"
|
|
||||||
type="url"
|
|
||||||
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
|
|
||||||
placeholder="Random instance (none selected)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_simplyTranslateInstance__">SimplyTranslate Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="simply-translate-instance"
|
|
||||||
type="url"
|
|
||||||
placeholder="https://translate.metalune.xyz"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_wikipediaInstance__">Wikipedia Instance</h1>
|
|
||||||
<div class="autocomplete">
|
|
||||||
<input
|
|
||||||
id="wikipedia-instance"
|
|
||||||
type="url"
|
|
||||||
placeholder="https://wikiless.org"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_theme__">Theme</h1>
|
|
||||||
<select id="theme">
|
|
||||||
<option value="">System</option>
|
|
||||||
<option value="light-theme">Light</option>
|
|
||||||
<option value="dark-theme">Dark</option>
|
|
||||||
</select>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="advanced" class="tabcontent">
|
|
||||||
<button type="button" class="collapsible">
|
|
||||||
Invidious
|
|
||||||
</button>
|
|
||||||
<div class="collapsible-content">
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_invidiousRandomPool__">
|
|
||||||
Invidious random instance pool (comma-separated)
|
|
||||||
</h1>
|
|
||||||
<input
|
|
||||||
id="invidious-random-pool"
|
|
||||||
name="invidious-random-pool"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table
|
|
||||||
class="option"
|
|
||||||
aria-label="Redirect YouTube to FreeTube where possible"
|
|
||||||
>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_useFreeTube__">
|
|
||||||
Use FreeTube over Invidious when possible
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="use-freetube"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="use-freetube" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table
|
|
||||||
class="option"
|
|
||||||
aria-label="Always proxy videos through Invidious"
|
|
||||||
>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_alwaysProxy__">
|
|
||||||
Always proxy videos through Invidious
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="always-proxy"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="always-proxy" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table
|
|
||||||
class="option"
|
|
||||||
aria-label="Only redirect embedded video to Invidious"
|
|
||||||
>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_onlyEmbeddedVideo__">
|
|
||||||
Only redirect embedded video to Invidious
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="only-embed"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="only-embed" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_videoQuality__">Invidious Video Quality</h1>
|
|
||||||
<select id="video-quality">
|
|
||||||
<option value="">Default</option>
|
|
||||||
<option value="hd720">720p</option>
|
|
||||||
<option value="medium">480p</option>
|
|
||||||
<option value="dash">DASH (Dynamic Adaptive Streaming over HTTP)</option>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Invidious dark mode aways on">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_invidiousDarkMode__">
|
|
||||||
Invidious dark mode always on
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="invidious-dark-mode"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="invidious-dark-mode" class="checkbox-label">
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_invidiousVolume__">
|
|
||||||
Invidious Volume
|
|
||||||
</h1>
|
|
||||||
<input
|
|
||||||
id="invidious-volume"
|
|
||||||
name="invidious-volume"
|
|
||||||
type="range"
|
|
||||||
min="0"
|
|
||||||
max="100"
|
|
||||||
step="1"
|
|
||||||
/><span id="volume-value"></span>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_invidiousPlayerStyle__">
|
|
||||||
Invidious Player Style
|
|
||||||
</h1>
|
|
||||||
<select id="invidious-player-style">
|
|
||||||
<option value="">Invidious</option>
|
|
||||||
<option value="youtube">YouTube</option>
|
|
||||||
</select>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_invidiousSubtitles__">
|
|
||||||
Invidious Subtitles - language codes (comma-separated)
|
|
||||||
</h1>
|
|
||||||
<input
|
|
||||||
id="invidious-subtitles"
|
|
||||||
name="invidious-subtitles"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table
|
|
||||||
class="option"
|
|
||||||
aria-label="Invidious automatically play video on load"
|
|
||||||
>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_invidiousAutoplay__">
|
|
||||||
Invidious automatically play video on load
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="invidious-autoplay"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="invidious-autoplay" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Persist Invidious preferences">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_persistInvidiousPrefs__">
|
|
||||||
Persist Invidious preferences (as cookie)
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="persist-invidious-prefs"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="persist-invidious-prefs" class="checkbox-label">
|
|
||||||
</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
<button type="button" class="collapsible">
|
|
||||||
Nitter
|
|
||||||
</button>
|
|
||||||
<div class="collapsible-content">
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_nitterRandomPool__">
|
|
||||||
Nitter random instance pool (comma-separated)
|
|
||||||
</h1>
|
|
||||||
<input
|
|
||||||
id="nitter-random-pool"
|
|
||||||
name="nitter-random-pool"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table
|
|
||||||
class="option"
|
|
||||||
aria-label="Proactively remove Twitter service worker"
|
|
||||||
>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_removeTwitterSW__">
|
|
||||||
Proactively remove Twitter service worker
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="remove-twitter-sw"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="remove-twitter-sw" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
<button type="button" class="collapsible">
|
|
||||||
Bibliogram
|
|
||||||
</button>
|
|
||||||
<div class="collapsible-content">
|
|
||||||
<section class="settings-block">
|
|
||||||
<h1 data-localise="__MSG_bibliogramRandomPool__">
|
|
||||||
Bibliogram random instance pool (comma-separated)
|
|
||||||
</h1>
|
|
||||||
<input
|
|
||||||
id="bibliogram-random-pool"
|
|
||||||
name="bibliogram-random-pool"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="exceptions" class="tabcontent">
|
|
||||||
<section class="settings-block">
|
|
||||||
<p data-localise="__MSG_exceptionsDescriptionP1__">
|
|
||||||
Enter a URL or Regular Expression to be excluded from redirects.
|
|
||||||
</p>
|
|
||||||
<p data-localise="__MSG_exceptionsDescriptionP2__">
|
|
||||||
All requests for or initiating from a URL that matches your exception
|
|
||||||
will be excluded from redirects.
|
|
||||||
</p>
|
|
||||||
<p data-localise="__MSG_exceptionsDescriptionP3__">
|
|
||||||
Note - Supports JavaScript regular expressions, excluding the
|
|
||||||
enclosing forward slashes.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="exceptions option">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_addException__">Add Exception</h1>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
id="new-exceptions-item"
|
|
||||||
type="text"
|
|
||||||
placeholder="URL or RegExp"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="radio" id="url" name="type" value="URL" checked />
|
|
||||||
<label class="radio" for="url">URL</label>
|
|
||||||
<input type="radio" id="regExp" name="type" value="RegExp" />
|
|
||||||
<label class="radio" for="regExp">RegExp</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button id="add-to-exceptions">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
>
|
|
||||||
<line
|
|
||||||
x1="256"
|
|
||||||
y1="112"
|
|
||||||
x2="256"
|
|
||||||
y2="400"
|
|
||||||
style="
|
|
||||||
fill: none;
|
|
||||||
stroke: #fff;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
stroke-width: 32px;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<line
|
|
||||||
x1="400"
|
|
||||||
y1="256"
|
|
||||||
x2="112"
|
|
||||||
y2="256"
|
|
||||||
style="
|
|
||||||
fill: none;
|
|
||||||
stroke: #fff;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
stroke-width: 32px;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<ul id="exceptions-items"></ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="module" src="./options.js"></script>
|
|
||||||
<script src="../../assets/javascripts/localise.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,584 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
import commonHelper from "../../assets/javascripts/helpers/common.js";
|
|
||||||
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
|
|
||||||
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
|
|
||||||
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
|
|
||||||
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
|
|
||||||
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
|
|
||||||
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
|
|
||||||
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
|
|
||||||
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
|
|
||||||
|
|
||||||
const nitterInstances = twitterHelper.redirects;
|
|
||||||
const invidiousInstances = youtubeHelper.redirects;
|
|
||||||
const bibliogramInstances = instagramHelper.redirects;
|
|
||||||
const osmInstances = mapsHelper.redirects;
|
|
||||||
const redditInstances = redditHelper.redirects;
|
|
||||||
const searchEngineInstances = searchHelper.redirects;
|
|
||||||
const simplyTranslateInstances = googleTranslateHelper.redirects;
|
|
||||||
const wikipediaInstances = wikipediaHelper.redirects;
|
|
||||||
const autocompletes = [
|
|
||||||
{ id: "nitter-instance", instances: nitterInstances },
|
|
||||||
{ id: "invidious-instance", instances: invidiousInstances },
|
|
||||||
{ id: "bibliogram-instance", instances: bibliogramInstances },
|
|
||||||
{ id: "osm-instance", instances: osmInstances },
|
|
||||||
{ id: "reddit-instance", instances: redditInstances },
|
|
||||||
{
|
|
||||||
id: "search-engine-instance",
|
|
||||||
instances: searchEngineInstances.map((instance) => instance.link),
|
|
||||||
},
|
|
||||||
{ id: "simply-translate-instance", instances: simplyTranslateInstances },
|
|
||||||
{ id: "wikipedia-instance", instances: wikipediaInstances },
|
|
||||||
];
|
|
||||||
const domparser = new DOMParser();
|
|
||||||
|
|
||||||
let nitterInstance = document.getElementById("nitter-instance");
|
|
||||||
let invidiousInstance = document.getElementById("invidious-instance");
|
|
||||||
let bibliogramInstance = document.getElementById("bibliogram-instance");
|
|
||||||
let osmInstance = document.getElementById("osm-instance");
|
|
||||||
let redditInstance = document.getElementById("reddit-instance");
|
|
||||||
let searchEngineInstance = document.getElementById("search-engine-instance");
|
|
||||||
let simplyTranslateInstance = document.getElementById(
|
|
||||||
"simply-translate-instance"
|
|
||||||
);
|
|
||||||
let wikipediaInstance = document.getElementById("wikipedia-instance");
|
|
||||||
let disableNitter = document.getElementById("disable-nitter");
|
|
||||||
let disableInvidious = document.getElementById("disable-invidious");
|
|
||||||
let disableBibliogram = document.getElementById("disable-bibliogram");
|
|
||||||
let disableOsm = document.getElementById("disable-osm");
|
|
||||||
let disableReddit = document.getElementById("disable-reddit");
|
|
||||||
let disableSearchEngine = document.getElementById("disable-search-engine");
|
|
||||||
let disableSimplyTranslate = document.getElementById(
|
|
||||||
"disable-simply-translate"
|
|
||||||
);
|
|
||||||
let disableWikipedia = document.getElementById("disable-wikipedia");
|
|
||||||
let alwaysProxy = document.getElementById("always-proxy");
|
|
||||||
let onlyEmbeddedVideo = document.getElementById("only-embed");
|
|
||||||
let videoQuality = document.getElementById("video-quality");
|
|
||||||
let removeTwitterSW = document.getElementById("remove-twitter-sw");
|
|
||||||
let invidiousDarkMode = document.getElementById("invidious-dark-mode");
|
|
||||||
let persistInvidiousPrefs = document.getElementById("persist-invidious-prefs");
|
|
||||||
let invidiousVolume = document.getElementById("invidious-volume");
|
|
||||||
let invidiousPlayerStyle = document.getElementById("invidious-player-style");
|
|
||||||
let invidiousSubtitles = document.getElementById("invidious-subtitles");
|
|
||||||
let invidiousAutoplay = document.getElementById("invidious-autoplay");
|
|
||||||
let theme = document.getElementById("theme");
|
|
||||||
let useFreeTube = document.getElementById("use-freetube");
|
|
||||||
let nitterRandomPool = document.getElementById("nitter-random-pool");
|
|
||||||
let invidiousRandomPool = document.getElementById("invidious-random-pool");
|
|
||||||
let bibliogramRandomPool = document.getElementById("bibliogram-random-pool");
|
|
||||||
let exceptions;
|
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
function prependExceptionsItem(item, index) {
|
|
||||||
const li = document.createElement("li");
|
|
||||||
li.appendChild(document.createTextNode(item.toString()));
|
|
||||||
const button = document.createElement("button");
|
|
||||||
li.appendChild(button);
|
|
||||||
document.getElementById("exceptions-items").prepend(li);
|
|
||||||
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 512 512'>
|
|
||||||
<line x1='368' y1='368' x2='144' y2='144'
|
|
||||||
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
|
||||||
<line x1='368' y1='144' x2='144' y2='368'
|
|
||||||
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
|
|
||||||
</svg>`;
|
|
||||||
button.appendChild(
|
|
||||||
domparser.parseFromString(svg, "image/svg+xml").documentElement
|
|
||||||
);
|
|
||||||
button.addEventListener("click", () => {
|
|
||||||
exceptions.splice(index, 1);
|
|
||||||
browser.storage.sync.set({
|
|
||||||
exceptions: exceptions,
|
|
||||||
});
|
|
||||||
li.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
browser.storage.sync.get(
|
|
||||||
[
|
|
||||||
"nitterInstance",
|
|
||||||
"invidiousInstance",
|
|
||||||
"bibliogramInstance",
|
|
||||||
"osmInstance",
|
|
||||||
"redditInstance",
|
|
||||||
"searchEngineInstance",
|
|
||||||
"simplyTranslateInstance",
|
|
||||||
"wikipediaInstance",
|
|
||||||
"disableNitter",
|
|
||||||
"disableInvidious",
|
|
||||||
"disableBibliogram",
|
|
||||||
"disableOsm",
|
|
||||||
"disableReddit",
|
|
||||||
"disableSearchEngine",
|
|
||||||
"disableSimplyTranslate",
|
|
||||||
"disableWikipedia",
|
|
||||||
"alwaysProxy",
|
|
||||||
"onlyEmbeddedVideo",
|
|
||||||
"videoQuality",
|
|
||||||
"removeTwitterSW",
|
|
||||||
"invidiousDarkMode",
|
|
||||||
"persistInvidiousPrefs",
|
|
||||||
"invidiousVolume",
|
|
||||||
"invidiousPlayerStyle",
|
|
||||||
"invidiousSubtitles",
|
|
||||||
"invidiousAutoplay",
|
|
||||||
"exceptions",
|
|
||||||
"theme",
|
|
||||||
"useFreeTube",
|
|
||||||
"nitterRandomPool",
|
|
||||||
"invidiousRandomPool",
|
|
||||||
"bibliogramRandomPool",
|
|
||||||
],
|
|
||||||
(result) => {
|
|
||||||
theme.value = result.theme || "";
|
|
||||||
if (result.theme) document.body.classList.add(result.theme);
|
|
||||||
nitterInstance.value = result.nitterInstance || "";
|
|
||||||
invidiousInstance.value = result.invidiousInstance || "";
|
|
||||||
bibliogramInstance.value = result.bibliogramInstance || "";
|
|
||||||
osmInstance.value = result.osmInstance || "";
|
|
||||||
redditInstance.value = result.redditInstance || "";
|
|
||||||
searchEngineInstance.value =
|
|
||||||
(result.searchEngineInstance && result.searchEngineInstance.link) || "";
|
|
||||||
simplyTranslateInstance.value = result.simplyTranslateInstance || "";
|
|
||||||
wikipediaInstance.value = result.wikipediaInstance || "";
|
|
||||||
disableNitter.checked = !result.disableNitter;
|
|
||||||
disableInvidious.checked = !result.disableInvidious;
|
|
||||||
disableBibliogram.checked = !result.disableBibliogram;
|
|
||||||
disableOsm.checked = !result.disableOsm;
|
|
||||||
disableReddit.checked = !result.disableReddit;
|
|
||||||
disableSearchEngine.checked = !result.disableSearchEngine;
|
|
||||||
disableSimplyTranslate.checked = !result.disableSimplyTranslate;
|
|
||||||
disableWikipedia.checked = !result.disableWikipedia;
|
|
||||||
alwaysProxy.checked = result.alwaysProxy;
|
|
||||||
onlyEmbeddedVideo.checked = result.onlyEmbeddedVideo;
|
|
||||||
videoQuality.value = result.videoQuality || "";
|
|
||||||
removeTwitterSW.checked = !result.removeTwitterSW;
|
|
||||||
invidiousDarkMode.checked = result.invidiousDarkMode;
|
|
||||||
persistInvidiousPrefs.checked = result.persistInvidiousPrefs;
|
|
||||||
exceptions = result.exceptions || [];
|
|
||||||
exceptions.forEach(prependExceptionsItem);
|
|
||||||
invidiousVolume.value = result.invidiousVolume;
|
|
||||||
document.querySelector("#volume-value").textContent = result.invidiousVolume
|
|
||||||
? `${result.invidiousVolume}%`
|
|
||||||
: " - ";
|
|
||||||
invidiousPlayerStyle.value = result.invidiousPlayerStyle || "";
|
|
||||||
invidiousSubtitles.value = result.invidiousSubtitles || "";
|
|
||||||
invidiousAutoplay.checked = result.invidiousAutoplay;
|
|
||||||
useFreeTube.checked = result.useFreeTube;
|
|
||||||
nitterRandomPool.value =
|
|
||||||
result.nitterRandomPool || commonHelper.filterInstances(nitterInstances);
|
|
||||||
invidiousRandomPool.value =
|
|
||||||
result.invidiousRandomPool ||
|
|
||||||
commonHelper.filterInstances(invidiousInstances);
|
|
||||||
bibliogramRandomPool.value =
|
|
||||||
result.bibliogramRandomPool ||
|
|
||||||
commonHelper.filterInstances(bibliogramInstances);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function openTab(tab, event) {
|
|
||||||
let i, tabcontent, tablinks;
|
|
||||||
tabcontent = document.getElementsByClassName("tabcontent");
|
|
||||||
for (i = 0; i < tabcontent.length; i++) {
|
|
||||||
tabcontent[i].style.display = "none";
|
|
||||||
}
|
|
||||||
tablinks = document.getElementsByClassName("tablinks");
|
|
||||||
for (i = 0; i < tablinks.length; i++) {
|
|
||||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
|
||||||
}
|
|
||||||
document.getElementById(tab).style.display = "block";
|
|
||||||
event.currentTarget.className += " active";
|
|
||||||
}
|
|
||||||
|
|
||||||
document
|
|
||||||
.getElementById("general-tab")
|
|
||||||
.addEventListener("click", openTab.bind(null, "general"));
|
|
||||||
document
|
|
||||||
.getElementById("advanced-tab")
|
|
||||||
.addEventListener("click", openTab.bind(null, "advanced"));
|
|
||||||
document
|
|
||||||
.getElementById("exceptions-tab")
|
|
||||||
.addEventListener("click", openTab.bind(null, "exceptions"));
|
|
||||||
|
|
||||||
document.getElementById("general-tab").click();
|
|
||||||
|
|
||||||
function addToExceptions() {
|
|
||||||
const input = document.getElementById("new-exceptions-item");
|
|
||||||
const type = document.querySelector('input[name="type"]:checked').value;
|
|
||||||
if (input.value) {
|
|
||||||
try {
|
|
||||||
let value = input.value;
|
|
||||||
new RegExp(input.value);
|
|
||||||
if (type === "URL") {
|
|
||||||
value = value.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
||||||
}
|
|
||||||
exceptions.push(value);
|
|
||||||
browser.storage.sync.set({
|
|
||||||
exceptions: exceptions,
|
|
||||||
});
|
|
||||||
prependExceptionsItem(value, exceptions.indexOf(value));
|
|
||||||
input.value = "";
|
|
||||||
} catch (error) {
|
|
||||||
input.setCustomValidity("Invalid RegExp");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
input.setCustomValidity("Invalid RegExp");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document
|
|
||||||
.getElementById("add-to-exceptions")
|
|
||||||
.addEventListener("click", addToExceptions);
|
|
||||||
|
|
||||||
function debounce(func, wait, immediate) {
|
|
||||||
let timeout;
|
|
||||||
return () => {
|
|
||||||
let context = this,
|
|
||||||
args = arguments;
|
|
||||||
let later = () => {
|
|
||||||
timeout = null;
|
|
||||||
if (!immediate) func.apply(context, args);
|
|
||||||
};
|
|
||||||
let callNow = immediate && !timeout;
|
|
||||||
clearTimeout(timeout);
|
|
||||||
timeout = setTimeout(later, wait);
|
|
||||||
if (callNow) func.apply(context, args);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseURL(urlString) {
|
|
||||||
if (urlString) {
|
|
||||||
try {
|
|
||||||
const url = new URL(urlString);
|
|
||||||
if (url.username && url.password) {
|
|
||||||
return `${url.protocol}//${url.username}:${url.password}@${url.host}`;
|
|
||||||
} else {
|
|
||||||
return url.origin;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const nitterInstanceChange = debounce(() => {
|
|
||||||
if (nitterInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
nitterInstance: parseURL(nitterInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
nitterInstance.addEventListener("input", nitterInstanceChange);
|
|
||||||
|
|
||||||
const invidiousInstanceChange = debounce(() => {
|
|
||||||
if (invidiousInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
invidiousInstance: parseURL(invidiousInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
invidiousInstance.addEventListener("input", invidiousInstanceChange);
|
|
||||||
|
|
||||||
const bibliogramInstanceChange = debounce(() => {
|
|
||||||
if (bibliogramInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
bibliogramInstance: parseURL(bibliogramInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
bibliogramInstance.addEventListener("input", bibliogramInstanceChange);
|
|
||||||
|
|
||||||
const osmInstanceChange = debounce(() => {
|
|
||||||
if (osmInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
osmInstance: parseURL(osmInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
osmInstance.addEventListener("input", osmInstanceChange);
|
|
||||||
|
|
||||||
const redditInstanceChange = debounce(() => {
|
|
||||||
if (redditInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
redditInstance: parseURL(redditInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
redditInstance.addEventListener("input", redditInstanceChange);
|
|
||||||
|
|
||||||
const searchEngineInstanceChange = debounce(() => {
|
|
||||||
const instance = searchEngineInstances.find(
|
|
||||||
(instance) => instance.link === searchEngineInstance.value
|
|
||||||
);
|
|
||||||
if (instance || !searchEngineInstance.value) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
searchEngineInstance: instance || searchEngineInstance.value,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
searchEngineInstance.setCustomValidity("Must be an instance from the list");
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
searchEngineInstance.addEventListener("input", searchEngineInstanceChange);
|
|
||||||
|
|
||||||
const simplyTranslateInstanceChange = debounce(() => {
|
|
||||||
if (simplyTranslateInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
simplyTranslateInstance: parseURL(simplyTranslateInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
simplyTranslateInstance.addEventListener(
|
|
||||||
"input",
|
|
||||||
simplyTranslateInstanceChange
|
|
||||||
);
|
|
||||||
|
|
||||||
const wikipediaInstanceChange = debounce(() => {
|
|
||||||
if (wikipediaInstance.checkValidity()) {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
wikipediaInstance: parseURL(wikipediaInstance.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
wikipediaInstance.addEventListener(
|
|
||||||
"input",
|
|
||||||
wikipediaInstanceChange
|
|
||||||
);
|
|
||||||
|
|
||||||
disableNitter.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableNitter: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableInvidious.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableInvidious: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableBibliogram.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableBibliogram: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableOsm.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableOsm: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableReddit.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableReddit: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableSearchEngine.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableSearchEngine: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableSimplyTranslate.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableSimplyTranslate: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableWikipedia.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableWikipedia: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
alwaysProxy.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ alwaysProxy: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
onlyEmbeddedVideo.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ onlyEmbeddedVideo: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
videoQuality.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
videoQuality: event.target.options[videoQuality.selectedIndex].value,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
removeTwitterSW.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ removeTwitterSW: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
invidiousDarkMode.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ invidiousDarkMode: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
persistInvidiousPrefs.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ persistInvidiousPrefs: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
useFreeTube.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ useFreeTube: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
const invidiousVolumeChange = debounce(() => {
|
|
||||||
document.querySelector(
|
|
||||||
"#volume-value"
|
|
||||||
).textContent = `${invidiousVolume.value}%`;
|
|
||||||
browser.storage.sync.set({
|
|
||||||
invidiousVolume: invidiousVolume.value,
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
invidiousVolume.addEventListener("input", invidiousVolumeChange);
|
|
||||||
|
|
||||||
invidiousPlayerStyle.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
invidiousPlayerStyle:
|
|
||||||
event.target.options[invidiousPlayerStyle.selectedIndex].value,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const invidiousSubtitlesChange = debounce(() => {
|
|
||||||
browser.storage.sync.set({ invidiousSubtitles: invidiousSubtitles.value });
|
|
||||||
}, 500);
|
|
||||||
invidiousSubtitles.addEventListener("input", invidiousSubtitlesChange);
|
|
||||||
|
|
||||||
invidiousAutoplay.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ invidiousAutoplay: event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
const nitterRandomPoolChange = debounce(() => {
|
|
||||||
browser.storage.sync.set({ nitterRandomPool: nitterRandomPool.value });
|
|
||||||
}, 500);
|
|
||||||
nitterRandomPool.addEventListener("input", nitterRandomPoolChange);
|
|
||||||
|
|
||||||
const invidiousRandomPoolChange = debounce(() => {
|
|
||||||
browser.storage.sync.set({ invidiousRandomPool: invidiousRandomPool.value });
|
|
||||||
}, 500);
|
|
||||||
invidiousRandomPool.addEventListener("input", invidiousRandomPoolChange);
|
|
||||||
|
|
||||||
const bibliogramRandomPoolChange = debounce(() => {
|
|
||||||
browser.storage.sync.set({
|
|
||||||
bibliogramRandomPool: bibliogramRandomPool.value,
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
bibliogramRandomPool.addEventListener("input", bibliogramRandomPoolChange);
|
|
||||||
|
|
||||||
theme.addEventListener("change", (event) => {
|
|
||||||
const value = event.target.options[theme.selectedIndex].value;
|
|
||||||
switch (value) {
|
|
||||||
case "dark-theme":
|
|
||||||
document.body.classList.add("dark-theme");
|
|
||||||
document.body.classList.remove("light-theme");
|
|
||||||
break;
|
|
||||||
case "light-theme":
|
|
||||||
document.body.classList.add("light-theme");
|
|
||||||
document.body.classList.remove("dark-theme");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
document.body.classList.remove("light-theme");
|
|
||||||
document.body.classList.remove("dark-theme");
|
|
||||||
}
|
|
||||||
browser.storage.sync.set({
|
|
||||||
theme: value,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function autocomplete(input, list) {
|
|
||||||
let currentFocus;
|
|
||||||
input.addEventListener("focus", (e) => {
|
|
||||||
showOptions(e, true);
|
|
||||||
});
|
|
||||||
input.addEventListener("input", (e) => {
|
|
||||||
const val = e.target.value;
|
|
||||||
if (!val) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
currentFocus = -1;
|
|
||||||
showOptions(e);
|
|
||||||
});
|
|
||||||
input.addEventListener("keydown", function (e) {
|
|
||||||
let x = document.getElementById(this.id + "autocomplete-list");
|
|
||||||
if (x) x = x.getElementsByTagName("div");
|
|
||||||
if (e.keyCode == 40) {
|
|
||||||
currentFocus++;
|
|
||||||
addActive(x);
|
|
||||||
} else if (e.keyCode == 38) {
|
|
||||||
currentFocus--;
|
|
||||||
addActive(x);
|
|
||||||
} else if (e.keyCode == 13) {
|
|
||||||
e.preventDefault();
|
|
||||||
if (currentFocus > -1) {
|
|
||||||
if (x) x[currentFocus].click();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function showOptions(event, showAll = false) {
|
|
||||||
let div,
|
|
||||||
i,
|
|
||||||
val = event.target.value;
|
|
||||||
closeAllLists();
|
|
||||||
div = document.createElement("div");
|
|
||||||
div.setAttribute("id", event.target.id + "autocomplete-list");
|
|
||||||
div.setAttribute("class", "autocomplete-items");
|
|
||||||
event.target.parentNode.appendChild(div);
|
|
||||||
for (i = 0; i < list.length; i++) {
|
|
||||||
if (list[i].toLowerCase().indexOf(val.toLowerCase()) > -1) {
|
|
||||||
div.appendChild(getItem(list[i], val));
|
|
||||||
} else if (showAll) {
|
|
||||||
div.appendChild(getItem(list[i], val));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getItem(item, val) {
|
|
||||||
const div = document.createElement("div");
|
|
||||||
const strong = document.createElement("strong");
|
|
||||||
strong.textContent = item.substr(0, val.length);
|
|
||||||
div.innerText = item.substr(val.length);
|
|
||||||
const hiddenInput = document.createElement("input");
|
|
||||||
hiddenInput.type = "hidden";
|
|
||||||
hiddenInput.value = item;
|
|
||||||
div.prepend(strong);
|
|
||||||
div.appendChild(hiddenInput);
|
|
||||||
div.addEventListener("click", function (e) {
|
|
||||||
input.value = div.getElementsByTagName("input")[0].value;
|
|
||||||
input.dispatchEvent(new Event("input"));
|
|
||||||
closeAllLists();
|
|
||||||
});
|
|
||||||
return div;
|
|
||||||
}
|
|
||||||
function addActive(x) {
|
|
||||||
if (!x) return false;
|
|
||||||
removeActive(x);
|
|
||||||
if (currentFocus >= x.length) currentFocus = 0;
|
|
||||||
if (currentFocus < 0) currentFocus = x.length - 1;
|
|
||||||
x[currentFocus].classList.add("autocomplete-active");
|
|
||||||
}
|
|
||||||
function removeActive(x) {
|
|
||||||
for (let i = 0; i < x.length; i++) {
|
|
||||||
x[i].classList.remove("autocomplete-active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function closeAllLists(elmnt) {
|
|
||||||
let x = document.getElementsByClassName("autocomplete-items");
|
|
||||||
for (let i = 0; i < x.length; i++) {
|
|
||||||
if (elmnt != x[i] && elmnt != input) {
|
|
||||||
x[i].parentNode.removeChild(x[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
document.addEventListener("click", (e) => {
|
|
||||||
if (!autocompletes.find((element) => element.id === e.target.id)) {
|
|
||||||
closeAllLists(e.target);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
autocompletes.forEach((value) => {
|
|
||||||
autocomplete(document.getElementById(value.id), value.instances);
|
|
||||||
});
|
|
||||||
|
|
||||||
var coll = document.getElementsByClassName("collapsible");
|
|
||||||
var i;
|
|
||||||
|
|
||||||
for (i = 0; i < coll.length; i++) {
|
|
||||||
coll[i].addEventListener("click", function () {
|
|
||||||
this.classList.toggle("collapsible-active");
|
|
||||||
var content = this.nextElementSibling;
|
|
||||||
if (content.style.display === "block") {
|
|
||||||
content.style.display = "none";
|
|
||||||
} else {
|
|
||||||
content.style.display = "block";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,265 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title></title>
|
|
||||||
<link href="../../assets/stylesheets/styles.css" rel="stylesheet" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="popup">
|
|
||||||
<header class="popup">
|
|
||||||
<div class="logo-container">
|
|
||||||
<img
|
|
||||||
src="../../assets/images/icon128.png"
|
|
||||||
alt="Privacy Redirect logo"
|
|
||||||
/>
|
|
||||||
<h1>
|
|
||||||
<span data-localise="__MSG_privacy__" class="privacy">Privacy</span
|
|
||||||
><br /><span data-localise="__MSG_redirect__">Redirect</span>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="version">
|
|
||||||
<span data-localise="__MSG_version__">Version</span>: <span
|
|
||||||
id="version"
|
|
||||||
></span>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Nitter redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableNitter__">Nitter Redirects</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-nitter"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-nitter" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Invidious redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableInvidious__">
|
|
||||||
Invidious Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-invidious"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-invidious" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Bibliogram redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableBibliogram__">
|
|
||||||
Bibliogram Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-bibliogram"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-bibliogram" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle OpenStreetMap redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableOsm__">
|
|
||||||
OpenStreetMap Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-osm"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-osm" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle old Reddit redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableReddit__">Reddit Redirects</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-reddit"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-reddit" class="checkbox-label"> </label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Search Engine redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableSearchEngine__">
|
|
||||||
Search Engine Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-searchEngine"
|
|
||||||
type="checkbox"
|
|
||||||
checked
|
|
||||||
/>
|
|
||||||
<label for="disable-searchEngine" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle SimplyTranslate redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1 data-localise="__MSG_disableSimplyTranslate__">
|
|
||||||
SimplyTranslate Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-simplyTranslate"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
for="disable-simplyTranslate"
|
|
||||||
class="checkbox-label"
|
|
||||||
></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block">
|
|
||||||
<table class="option" aria-label="Toggle Wikipedia redirects">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h1
|
|
||||||
data-localise="__MSG_disableWikipedia__"
|
|
||||||
class="new-badge"
|
|
||||||
data-new-badge
|
|
||||||
>
|
|
||||||
Wikipedia Redirects
|
|
||||||
</h1>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input
|
|
||||||
aria-hidden="true"
|
|
||||||
id="disable-wikipedia"
|
|
||||||
type="checkbox"
|
|
||||||
/>
|
|
||||||
<label for="disable-wikipedia" class="checkbox-label"></label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="settings-block"></section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<a class="button" id="more-options">
|
|
||||||
<span data-localise="__MSG_moreOptions__">More Options </span>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M384,224V408a40,40,0,0,1-40,40H104a40,40,0,0,1-40-40V168a40,40,0,0,1,40-40H271.48"
|
|
||||||
style="
|
|
||||||
fill: none;
|
|
||||||
stroke: inherit;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
stroke-width: 32px;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="336 64 448 64 448 176"
|
|
||||||
style="
|
|
||||||
fill: none;
|
|
||||||
stroke: inherit;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
stroke-width: 32px;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<line
|
|
||||||
x1="224"
|
|
||||||
y1="288"
|
|
||||||
x2="440"
|
|
||||||
y2="72"
|
|
||||||
style="
|
|
||||||
fill: none;
|
|
||||||
stroke: inherit;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
stroke-width: 32px;
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script type="module" src="./popup.js"></script>
|
|
||||||
<script src="../../assets/javascripts/localise.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,76 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
let disableNitter = document.querySelector("#disable-nitter");
|
|
||||||
let disableInvidious = document.querySelector("#disable-invidious");
|
|
||||||
let disableBibliogram = document.querySelector("#disable-bibliogram");
|
|
||||||
let disableOsm = document.querySelector("#disable-osm");
|
|
||||||
let disableReddit = document.querySelector("#disable-reddit");
|
|
||||||
let disableSearchEngine = document.querySelector("#disable-searchEngine");
|
|
||||||
let disableSimplyTranslate = document.querySelector("#disable-simplyTranslate");
|
|
||||||
let disableWikipedia = document.querySelector("#disable-wikipedia");
|
|
||||||
let version = document.querySelector("#version");
|
|
||||||
|
|
||||||
window.browser = window.browser || window.chrome;
|
|
||||||
|
|
||||||
browser.storage.sync.get(
|
|
||||||
[
|
|
||||||
"disableNitter",
|
|
||||||
"disableInvidious",
|
|
||||||
"disableBibliogram",
|
|
||||||
"disableOsm",
|
|
||||||
"disableReddit",
|
|
||||||
"disableSearchEngine",
|
|
||||||
"disableSimplyTranslate",
|
|
||||||
"disableWikipedia",
|
|
||||||
"theme",
|
|
||||||
],
|
|
||||||
(result) => {
|
|
||||||
if (result.theme) document.body.classList.add(result.theme);
|
|
||||||
disableNitter.checked = !result.disableNitter;
|
|
||||||
disableInvidious.checked = !result.disableInvidious;
|
|
||||||
disableBibliogram.checked = !result.disableBibliogram;
|
|
||||||
disableOsm.checked = !result.disableOsm;
|
|
||||||
disableReddit.checked = !result.disableReddit;
|
|
||||||
disableSearchEngine.checked = !result.disableSearchEngine;
|
|
||||||
disableSimplyTranslate.checked = !result.disableSimplyTranslate;
|
|
||||||
disableWikipedia.checked = !result.disableWikipedia;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
version.textContent = browser.runtime.getManifest().version;
|
|
||||||
|
|
||||||
disableNitter.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableNitter: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableInvidious.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableInvidious: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableBibliogram.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableBibliogram: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableOsm.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableOsm: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableReddit.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableReddit: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableSearchEngine.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableSearchEngine: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableSimplyTranslate.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableSimplyTranslate: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
disableWikipedia.addEventListener("change", (event) => {
|
|
||||||
browser.storage.sync.set({ disableWikipedia: !event.target.checked });
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelector("#more-options").addEventListener("click", () => {
|
|
||||||
browser.runtime.openOptionsPage();
|
|
||||||
});
|
|
|
@ -1,8 +1,9 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
ignoreFiles: [
|
ignoreFiles: [
|
||||||
"assets/images/Screen Shot*.png",
|
'assets/images/Screen Shot*.png',
|
||||||
"assets/images/buy-me-a-coffee.png",
|
'assets/images/small-tile.png',
|
||||||
"assets/images/logo*.png",
|
'assets/images/buy-me-a-coffee.png',
|
||||||
"assets/images/badge*.png",
|
'assets/images/logo*.png',
|
||||||
|
'assets/images/*-badge.png'
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|