├── .github
└── workflows
│ ├── testInstances.js
│ └── testInstances.yml
├── .gitignore
├── LICENSE
├── README.md
├── doc
├── README_tr.md
├── TODO.md
└── links.md
├── package-lock.json
├── package.json
└── privacy-redirector.user.js
/.github/workflows/testInstances.js:
--------------------------------------------------------------------------------
1 | const axios = require('axios');
2 | const fs = require('fs');
3 |
4 | async function checkUrl(url) {
5 | try {
6 | console.debug(`Checking URL ${url}`);
7 | await axios.get(url, { headers: {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0'}});
8 | return null;
9 | } catch (error) {
10 | if(error.code === 'ENOTFOUND') {
11 | return "ENOTFOUND";
12 | }
13 | if (error.response === 404 || error.response === 403 || error.response >= 500) {
14 | return "HTTP error: " + error.response;
15 | }
16 | }
17 | }
18 |
19 | async function checkUrls(instances) {
20 | let hasFailed = false;
21 |
22 | var checks = []
23 | for (const k in instances) {
24 | for(const i in instances[k]){
25 | const url = `https://${instances[k][i]}`;
26 | checks.push([url, checkUrl(url)]);
27 | }
28 | }
29 |
30 | console.log('\n\n\n\n##########\n\n')
31 |
32 | for(var a in checks) {
33 | let result = await checks[a][1];
34 | if(result) {
35 | console.warn(`Warning: URL ${checks[a][0]} is down! ${result}`);
36 | // console.debug(result)
37 | hasFailed = true;
38 | }
39 | }
40 |
41 | if (hasFailed) {
42 | console.error('\n\nThere are offline privacy instances');
43 | process.exit(1);
44 | } else {
45 | console.log('All instances are online');
46 | }
47 | }
48 |
49 | window = {
50 | location:
51 | { hostname: "NONE", hash: "x" }
52 | };
53 | let extension = require('../../privacy-redirector.user.js')
54 |
55 | checkUrls(extension.Instances);
56 |
--------------------------------------------------------------------------------
/.github/workflows/testInstances.yml:
--------------------------------------------------------------------------------
1 | name: Test Privacy Instances
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 | schedule:
9 | - cron: "0 0 * * *"
10 |
11 | jobs:
12 | test_instances:
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - name: Checkout repository
17 | uses: actions/checkout@v4
18 |
19 | - name: Setup Node.js
20 | uses: actions/setup-node@v4
21 | with:
22 | node-version: 20
23 | cache: 'npm'
24 | cache-dependency-path: package-lock.json
25 |
26 | - name: Install dependencies
27 | run: npm install axios
28 |
29 | - name: Run testInstances.js
30 | run: node .github/workflows/testInstances.js
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
676 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 🔀 Privacy Redirector
2 |
3 | [](https://greasyfork.org/scripts/436359-privacy-redirector)
4 | [](https://greasyfork.org/scripts/436359-privacy-redirector)
5 | [](./LICENSE)
6 | 
7 |
8 | ## 📖 Description
9 |
10 | The Privacy Redirector userscript redirects popular social media platforms to privacy-respecting frontends, such as Nitter for Twitter and Piped for YouTube. This helps you enjoy the content while avoiding unnecessary tracking.
11 |
12 | Bu belgeyi Türkçe okumak için
13 | tıklayın.
14 |
15 | ## ⚙️ Installation
16 |
17 | ### Greasyfork
18 |
19 | You can install the userscript directly from [Greasyfork](https://greasyfork.org/scripts/436359-privacy-redirector).
20 |
21 | ### Manual Installation
22 |
23 | By [clicking this URL](https://raw.githubusercontent.com/dybdeskarphet/privacy-redirector/main/privacy-redirector.user.js), your userscript manager should detect the script automatically. If it doesn't:
24 |
25 | 1. **Copy the Script**
26 |
27 | Copy the contents of [privacy-redirector.user.js](https://raw.githubusercontent.com/dybdeskarphet/privacy-redirector/main/privacy-redirector.user.js).
28 |
29 | 2. **Userscript Manager**
30 |
31 | Add the copied script to your userscript manager. If you don't have a userscript manager, you can use one of the following:
32 |
33 | - [Violentmonkey](https://violentmonkey.github.io/) (Edge, Chrome, Firefox)
34 | - [Tampermonkey](https://www.tampermonkey.net/) (Chrome, Firefox, Safari, Edge)
35 | - [Greasemonkey](https://www.greasespot.net/) (Firefox)
36 |
37 | ## 🔍 Usage
38 |
39 | Once the userscript is installed, visit your favorite social media platforms, and you will be automatically redirected to the privacy-respecting frontend.
40 |
41 | ## 🔥 Supported Platforms
42 |
43 | - Bandcamp → [Tent](https://forgejo.sny.sh/sun/Tent)
44 | - Deepl → [Mozhi](https://codeberg.org/aryak/mozhi)
45 | - DeviantArt → [SkunkyArt](https://git.macaw.me/skunky/SkunkyArt)
46 | - Fandom → [Breezewiki](https://breezewiki.com/)
47 | - Genius → [dumb](https://github.com/rramiachraf/dumb), [Intellectual](https://github.com/Insprill/intellectual)
48 | - Goodreads → [BiblioReads](https://github.com/nesaku/BiblioReads)
49 | - Google Translate → [Lingva Translate](https://github.com/rsmt/lingva-translate), [Mozhi](https://codeberg.org/aryak/mozhi)
50 | - Google → [Librey](https://github.com/Ahwxorg/librey/), [SearX](https://github.com/searx/searx), [SearXNG](https://github.com/searxng/searxng)
51 | - Hacker News → [Worker](https://github.com/worker-tools/worker-news), [Better](https://github.com/vedantnn71/better-hackernews)
52 | - IMDb → [libremdb](https://github.com/zyachel/libremdb)
53 | - Imgur → [rimgo](https://codeberg.org/rimgo/rimgo)
54 | - Instagram → [Proxigram](https://codeberg.org/ThePenguinDev/Proxigram)
55 | - Medium → [Scribe](https://sr.ht/~edwardloveall/Scribe/), [LibMedium](https://github.com/realaravinth/libmedium), [medium.rip](https://github.com/SphericalKat/medium.rip)
56 | - Pinterest → [Binternet](https://github.com/Ahwxorg/Binternet)
57 | - Pixiv → [PixivFE](https://codeberg.org/vnpower/pixivfe)
58 | - Quora → [Quetre](https://github.com/zyachel/quetre)
59 | - Reddit → [Libreddit](https://github.com/libreddit/libreddit), [Teddit](https://codeberg.org/teddit/teddit)
60 | - Reuters → [Neuters](https://github.com/HookedBehemoth/neuters)
61 | - SoundCloud → [Tubo](https://github.com/migalmoreno/tubo)
62 | - Stack Overflow → [AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow)
63 | - TikTok → [ProxiTok](https://github.com/pablouser1/ProxiTok)
64 | - Tumblr → [Priviblur](https://github.com/syeopite/priviblur)
65 | - Twitch → [SafeTwitch](https://codeberg.org/SafeTwitch/safetwitch)
66 | - Twitter → [Nitter](https://github.com/zedeus/nitter)
67 | - Wikipedia → [Wikiless](https://codeberg.org/orenom/wikiless)
68 | - YouTube Music → [Piped](https://github.com/TeamPiped/Piped), [Invidious](https://github.com/iv-org/invidious), [Hyperpipe](https://codeberg.org/Hyperpipe/Hyperpipe)
69 | - YouTube → [Piped](https://github.com/TeamPiped/Piped), [Invidious](https://github.com/iv-org/invidious), [Tubo](https://github.com/migalmoreno/tubo)
70 |
71 | Feel free to contribute and add support for more platforms!
72 |
73 | ## ❓ FAQ
74 |
75 | - **How can I disable some redirections?**
76 |
77 | You have to edit the values of the userscript. Change the `REDIRECTION` value to
78 | `false` for the redirections you want. You can also disable [farside.link](https://github.com/benbusby/farside)
79 | and add your custom instances. A little familiarity with JavaScript syntax should
80 | be enough.
81 |
82 | - **Why scribe.rip doesn't redirect to user pages?**
83 |
84 | "It's intentional that there is no way to browse content from a user, see popular
85 | posts, consume via an RSS feed, or further engage with an article via comments or
86 | "claps".I want to spend my time encouraging writers to move to worthy platforms,
87 | not making a bad platform worthy."
88 | ~ [edwardloveall](https://sr.ht/~edwardloveall/Scribe/#project-goals)
89 |
90 | ## ❤️ Contributing
91 |
92 | Contributions are welcome! Feel free to open issues and pull requests to enhance the functionality or add support for additional platforms.
93 |
94 | ## 🫂 Credits
95 |
96 | - [joshcangit](https://github.com/joshcangit)
97 | - [Farside.link](https://github.com/benbusby/farside)
98 | - [Libredirect](https://github.com/libredirect/browser_extension) for
99 | Bandcamp redirection
100 |
101 | ## 📜 License
102 |
103 | This project is licensed under the GPL-3.0 license - see the [LICENSE](LICENSE) file for details.
104 |
--------------------------------------------------------------------------------
/doc/README_tr.md:
--------------------------------------------------------------------------------
1 | # 🔀 Gizlilik Yönlendiricisi
2 |
3 | [](https://greasyfork.org/scripts/436359-privacy-redirector)
4 | [](https://greasyfork.org/scripts/436359-privacy-redirector)
5 | 
6 |
7 | Bu kullanıcı betiği popüler sosyal medya platformlarını gizliliğe saygı duyan
8 | önyüzlerine yönlendirir. Betiği [GreasyFork](https://greasyfork.org/scripts/436359-privacy-redirector)
9 | kullanarak ekleyebilir veya bu depoyu klonlayıp
10 | [elle](https://violentmonkey.github.io/guide/creating-a-userscript/) tarayıcınıza
11 | ekleyebilirsiniz.
12 |
13 | Click here to
14 | read this document in English.
15 |
16 | ## ❓ SSS
17 |
18 | __Bazı yönlendirmeleri nasıl devre dışı bırakabilirim?__
19 | > Betiğin değerlerini düzenlemeniz gerekir. İstediğiniz yönlendirme için `REDIRECTION`
20 | değerini `false` olarak değiştirin. Ayrıca [farside.link](https://github.com/benbusby/farside)'i
21 | devre dışı bırakabilir, kendi özel örneklerinizi (instance) ekleyebilirsiniz.
22 | JavaScript sözdizimine biraz aşina olmanız yeterli olacaktır.
23 |
24 | __Neden scribe.rip kullanıcı sayfalarına yönlendirmiyor?__
25 | > Projenin yazarı Medium'u daha değerli hale getirmek yerine yazarları kötü
26 | platformlardan daha güzel platformlara yönlendirmek istiyor. Bu sebeple Medium'u
27 | eksiksiz bir şekilde gezinmeyi sağlayan bir önyüz yerine sadece makalelerin
28 | kendisine erişmeyi sağlayacak şekilde kalmasını istiyor.
29 | Asıl yazı için: [Project Goals](https://sr.ht/~edwardloveall/scribe/#project-goals)
30 |
31 |
32 | ## 🫂 Teşekkürler
33 |
34 | * [Farside.link](https://github.com/benbusby/farside)
35 | * Bandcamp yönlendirmesi için
36 | [Libredirect](https://github.com/libredirect/browser_extension)'e
37 |
--------------------------------------------------------------------------------
/doc/TODO.md:
--------------------------------------------------------------------------------
1 | ## To-do
2 |
3 | - [ ] Add Bing, DuckDuckGo, Yandex and Yahoo redirection.
--------------------------------------------------------------------------------
/doc/links.md:
--------------------------------------------------------------------------------
1 | ## Instagram
2 |
3 | - **Profile:** `https://www.instagram.com/pewdiepie/`
4 | - **Post:** `https://www.instagram.com/p/BsOGulcndj-/`
5 | - **Reel:** `https://www.instagram.com/reel/CQhRxeyCG1_/`
6 | - **Story:** `https://www.instagram.com/stories/yohjiyamamotoofficial/2836598302495844703/`
7 |
8 | ### with `/accounts/login`
9 |
10 | - **Profile:** `https://www.instagram.com/accounts/login/?next=/pewdiepie/`
11 | - **Post:** `https://www.instagram.com/accounts/login/?next=/p/BsOGulcndj-/`
12 | - **Reel:** `https://www.instagram.com/accounts/login/?next=/reel/CQhRxeyCG1_/`
13 |
14 | ## Reddit
15 |
16 | - **Subreddit:** `https://www.reddit.com/r/linux`
17 | - **User:** `https://www.reddit.com/user/kn0thing`
18 | - **Post:** `https://www.reddit.com/r/reddit.com/comments/87/the_downing_street_memo/`
19 |
20 | ## Twitter
21 |
22 | - **Tweet:** `https://twitter.com/meteatature/status/935576650603024384`
23 | - **User:** `https://twitter.com/Anjyoun`
24 | - **Explore:** `https://twitter.com/explore`
25 |
26 | ## TikTok
27 |
28 | - **AMP:** `https://www.tiktok.com/amp/tag/foss`
29 |
30 | ## Medium
31 |
32 | - **Story:** `https://ptorbatii.medium.com/the-straightforward-guide-for-installing-arch-linux-2020-part-1-installing-the-base-system-eabc27767fd9`
33 |
34 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "privacy-redirector",
3 | "lockfileVersion": 3,
4 | "requires": true,
5 | "packages": {
6 | "": {
7 | "dependencies": {
8 | "axios": "^1.6.7"
9 | }
10 | },
11 | "node_modules/asynckit": {
12 | "version": "0.4.0",
13 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
14 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
15 | },
16 | "node_modules/axios": {
17 | "version": "1.6.7",
18 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
19 | "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
20 | "dependencies": {
21 | "follow-redirects": "^1.15.4",
22 | "form-data": "^4.0.0",
23 | "proxy-from-env": "^1.1.0"
24 | }
25 | },
26 | "node_modules/combined-stream": {
27 | "version": "1.0.8",
28 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
29 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
30 | "dependencies": {
31 | "delayed-stream": "~1.0.0"
32 | },
33 | "engines": {
34 | "node": ">= 0.8"
35 | }
36 | },
37 | "node_modules/delayed-stream": {
38 | "version": "1.0.0",
39 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
40 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
41 | "engines": {
42 | "node": ">=0.4.0"
43 | }
44 | },
45 | "node_modules/follow-redirects": {
46 | "version": "1.15.5",
47 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
48 | "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
49 | "funding": [
50 | {
51 | "type": "individual",
52 | "url": "https://github.com/sponsors/RubenVerborgh"
53 | }
54 | ],
55 | "engines": {
56 | "node": ">=4.0"
57 | },
58 | "peerDependenciesMeta": {
59 | "debug": {
60 | "optional": true
61 | }
62 | }
63 | },
64 | "node_modules/form-data": {
65 | "version": "4.0.0",
66 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
67 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
68 | "dependencies": {
69 | "asynckit": "^0.4.0",
70 | "combined-stream": "^1.0.8",
71 | "mime-types": "^2.1.12"
72 | },
73 | "engines": {
74 | "node": ">= 6"
75 | }
76 | },
77 | "node_modules/mime-db": {
78 | "version": "1.52.0",
79 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
80 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
81 | "engines": {
82 | "node": ">= 0.6"
83 | }
84 | },
85 | "node_modules/mime-types": {
86 | "version": "2.1.35",
87 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
88 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
89 | "dependencies": {
90 | "mime-db": "1.52.0"
91 | },
92 | "engines": {
93 | "node": ">= 0.6"
94 | }
95 | },
96 | "node_modules/proxy-from-env": {
97 | "version": "1.1.0",
98 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
99 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "axios": "^1.6.7"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/privacy-redirector.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name Privacy Redirector
3 | // @name:bg Пренасочване на поверителността
4 | // @name:br Rediretor de privacidade
5 | // @name:cs Přesměrování soukromí
6 | // @name:de Datenschutz Umleiter
7 | // @name:da Omdirigeringsenhed for privatlivets fred
8 | // @name:et Privaatsuse ümbersuunaja
9 | // @name:es Redirección de privacidad
10 | // @name:fi Yksityisyydensuojan uudelleenohjaus
11 | // @name:fr Redirecteur de confidentialité
12 | // @name:el Επανακατευθυντής απορρήτου
13 | // @name:hu Adatvédelmi átirányító
14 | // @name:id Pengarah Privasi
15 | // @name:it Reindirizzatore di privacy
16 | // @name:ja プライバシーリダイレクト
17 | // @name:lt Privatumo nukreipiklis
18 | // @name:lv Konfidencialitātes pāradresētājs
19 | // @name:nl Privacy-omleiding
20 | // @name:pl Przekierownik prywatności
21 | // @name:pt Redirector de Privacidade
22 | // @name:ro Redirector de confidențialitate
23 | // @name:ru Перенаправление конфиденциальности
24 | // @name:sv Omdirigering av sekretess
25 | // @name:sl Preusmerjevalnik zasebnosti
26 | // @name:sk Presmerovanie súkromia
27 | // @name:tr Gizlilik Yönlendiricisi
28 | // @name:uk Редиректор конфіденційності
29 | // @name:zh 隐私重定向器
30 | // @name:zh-CN 隐私重定向器
31 | // @description Redirect social media platforms to their privacy respecting frontends
32 | // @description:bg Пренасочване на платформите за социални медии към заглавните им страници, съобразени с поверителността
33 | // @description:br Redirecionando as plataformas de mídia social para suas primeiras páginas de privacidade
34 | // @description:cs Přesměrování platforem sociálních médií na jejich titulní stránky šetrné k soukromí
35 | // @description:de Leitet von Social-Media-Plattformen auf deren jeweilige datenschutzfreundlicheren Frontends
36 | // @description:da Omdirigering af sociale medieplatforme til deres privatlivsvenlige forsider
37 | // @description:et Sotsiaalmeediaplatvormide ümbersuunamine nende privaatsussõbralikele esilehtedele
38 | // @description:es Redirigir las plataformas de medios sociales a sus portadas respetuosas con la privacidad
39 | // @description:fi Sosiaalisen median alustojen ohjaaminen yksityisyyden suojaa edistäville etusivuille.
40 | // @description:fr Rediriger les plateformes de médias sociaux vers leurs pages d'accueil respectueuses de la vie privée
41 | // @description:el Αναπροσανατολισμός των πλατφορμών κοινωνικής δικτύωσης στις μπροστινές σελίδες τους που είναι φιλικές προς το απόρρητο
42 | // @description:hu A közösségi médiaplatformok átirányítása az adatvédelem-barát kezdőlapokra
43 | // @description:id Mengarahkan platform media sosial ke halaman depan yang ramah privasi
44 | // @description:it Reindirizzare le piattaforme di social media verso le loro pagine frontali che rispettano la privacy
45 | // @description:ja ソーシャルメディアプラットフォームをプライバシーに配慮したフロントページにリダイレクトする
46 | // @description:lt Socialinės žiniasklaidos platformų nukreipimas į privatumą užtikrinančius pirmuosius puslapius
47 | // @description:lv Sociālo plašsaziņas līdzekļu platformu pāradresēšana uz to privātumam draudzīgajām pirmajām lapām.
48 | // @description:nl Sociale-mediaplatforms omleiden naar hun privacyvriendelijke voorpagina's
49 | // @description:pl Przekierowanie platform mediów społecznościowych na ich przyjazne dla prywatności strony tytułowe
50 | // @description:pt Redireccionar as plataformas de redes sociais para as suas primeiras páginas amigas da privacidade
51 | // @description:ro Redirecționarea platformelor de socializare către paginile lor de început care respectă viața privată
52 | // @description:ru Перенаправление платформ социальных сетей на их главные страницы, дружественные к конфиденциальности
53 | // @description:sv Omdirigera sociala medieplattformar till deras integritetsvänliga förstasidor.
54 | // @description:sl preusmeritev platform družabnih medijev na njihove naslovne strani, ki so prijazne do zasebnosti.
55 | // @description:sk Presmerovanie platforiem sociálnych médií na ich úvodné stránky, ktoré chránia súkromie
56 | // @description:tr Sosyal medya platformlarını, gizliliğe saygı duyan önyüzlerine yönlendirir
57 | // @description:uk Перенаправлення соціальних медіа-платформ на їхні головні сторінки, дружні до приватності
58 | // @description:zh 将社交媒体平台重定向到其隐私友好的首页
59 | // @description:zh-CN 将社交媒体平台重定向到其隐私友好的首页
60 | // @namespace https://github.com/dybdeskarphet/privacy-redirector
61 | // @author Ahmet Arda Kavakcı
62 | // @license GPLv3
63 | // @version 1.6.2
64 | // @downloadURL
65 | // https://raw.githubusercontent.com/dybdeskarphet/privacy-redirector/main/privacy-redirector.user.js
66 | // @supportURL https://github.com/dybdeskarphet/privacy-redirector
67 | // @updateURL
68 | // https://raw.githubusercontent.com/dybdeskarphet/privacy-redirector/main/privacy-redirector.user.js
69 | // @run-at document-start
70 | // @match *://*.bandcamp.com/*
71 | // @match *://*.fandom.com/*
72 | // @match *://*.genius.com/*
73 | // @match *://*.google.com/*
74 | // @match *://*.imdb.com/*
75 | // @match *://*.imgur.com/*
76 | // @match *://*.imgur.io/*
77 | // @match *://*.instagram.com/*
78 | // @match *://*.medium.com/*
79 | // @match *://*.pinterest.com/*
80 | // @match *://*.quora.com/*
81 | // @match *://*.reddit.com/*
82 | // @match *://*.reuters.com/*
83 | // @match *://*.soundcloud.com/*
84 | // @match *://*.tiktok.com/*
85 | // @match *://*.twitch.tv/*
86 | // @match *://*.deepl.com/*
87 | // @match *://*.deviantart.com/*
88 | // @match *://twitch.tv/*
89 | // @match *://*.twitter.com/*
90 | // @match *://*.x.com/*
91 | // @match *://*.tumblr.com/*
92 | // @match *://x.com/*
93 | // @match *://*.wikipedia.org/*
94 | // @match *://*.youtube-nocookie.com/*
95 | // @match *://*.youtube.com/*
96 | // @match *://f4.bcbits.com/*
97 | // @match *://genius.com/*
98 | // @match *://i.pinimg.com/*
99 | // @match *://imgur.com/*
100 | // @match *://instagram.com/*
101 | // @match *://medium.com/*
102 | // @match *://news.ycombinator.com/*
103 | // @match *://reddit.com/*
104 | // @match *://stackoverflow.com/*
105 | // @match *://t4.bcbits.com/*
106 | // @match *://translate.google.com/*
107 | // @match *://twitter.com/*
108 | // @match *://www.goodreads.com/*
109 | // @match *://www.pixiv.net/*
110 | // @match *://youtube.com/*
111 | // @exclude *://*.youtube.com/redirect*
112 | // @exclude *://youtube.com/redirect*
113 | // ==/UserScript==
114 |
115 | /*
116 | ___ _ _ ___ _____ _____
117 | / _ \| \ | | / _ \| ___| ___|
118 | | | | | \| |_____| | | | |_ | |_
119 | | |_| | |\ |_____| |_| | _| | _|
120 | \___/|_| \_| \___/|_| |_|
121 |
122 | CHANGE THE RELEVANT VALUE TO "false" TO
123 | DISABLE THE REDIRECTION/FARSIDE FOR THAT
124 | PARTICULAR PLATFORM */
125 |
126 | // REDIRECTON / FARSIDE
127 |
128 | let bandcamp = [true, true];
129 | let deepl = [false, true]; // Mozhi Deepl engine doesn't work
130 | let deviantart = [true, false];
131 | let fandom = [true, true];
132 | let genius = [true, true];
133 | let goodreads = [true, false];
134 | let google = [true, true];
135 | let gtranslate = [true, true];
136 | let hackernews = [true, true];
137 | let imdb = [true, true];
138 | let imgur = [true, false];
139 | let instagram = [true, true];
140 | let medium = [true, true];
141 | let pinterest = [true, true];
142 | let pixiv = [true, true];
143 | let quora = [true, false];
144 | let reddit = [true, false];
145 | let reuters = [true, true];
146 | let soundcloud = [true, true];
147 | let stackoverflow = [true, true];
148 | let tiktok = [true, false];
149 | let tumblr = [true, false];
150 | let twitch = [true, true];
151 | let twitter = [true, true];
152 | let wikipedia = [true, false];
153 | let youtube = [true, false];
154 |
155 | // PREFERRED FRONTEND
156 | let youtubeFrontend = "freetube"; // accepts "invidious", "piped", "tubo", "freetube"
157 | let youtubeMusicFrontend = "hyperpipe"; // accepts "hyperpipe", "invidious", "piped"
158 | let redditFrontend = "libreddit"; // accepts "libreddit", "teddit"
159 | let googleFrontend = "librey"; // accepts "librey", "searx", "searxng"
160 | let googleTranslateFrontend = "mozhi"; // accepts "lingva" (farside available), "mozhi" (no farside)
161 | let geniusFrontend = "intellectual"; // accepts dumb, intellectual
162 | let mediumFrontend = "scribe"; // accepts libmedium, scribe, mediumrip
163 | let hackernewsFrontend = "better"; // accepts better, worker
164 |
165 | // OTHER SETTINGS
166 | let keepHistory = false; // keeps farside.link in the browser history
167 |
168 | // // // // // // // // // // // // //
169 |
170 | /*
171 | ___ _
172 | |_ _|_ __ ___| |_ __ _ _ __ ___ ___ ___
173 | | || '_ \/ __| __/ _` | '_ \ / __/ _ \/ __|
174 | | || | | \__ \ || (_| | | | | (_| __/\__ \
175 | |___|_| |_|___/\__\__,_|_| |_|\___\___||___/
176 |
177 | LIST OF INSTANCES TO USE IF FARSIDE IS NOT ENABLED
178 | */
179 |
180 | const Instances = {
181 | anonymousoverflow: [
182 | "code.whatever.social",
183 | "ao.vern.cc",
184 | "overflow.smnz.de",
185 | "overflow.lunar.icu",
186 | "overflow.adminforge.de",
187 | "overflow.projectsegfau.lt",
188 | "ao.bloat.cat",
189 | "overflow.ducks.party",
190 | "ao.owo.si",
191 | "overflow.freedit.eu",
192 | "ao.rootdo.org",
193 | "a.opnxng.com",
194 | "overflow.einfachzocken.eu",
195 | "exchange.seitan-ayoub.lol",
196 | "overflow.r4fo.com",
197 | ],
198 | hyperpipe: [
199 | "hyperpipe.surge.sh",
200 | "hyperpipe.onrender.com",
201 | "music.adminforge.de",
202 | "music.pfcd.me",
203 | "hyperpipe.projectsegfau.lt",
204 | "hp.ggtyler.dev",
205 | "hyperpipe.lunar.icu",
206 | "music.seitan-ayoub.lol",
207 | ],
208 | proxigram: [
209 | "proxigram.protokolla.fi",
210 | "proxigram.kyun.li",
211 | "proxigram.lunar.icu",
212 | "ig.opnxng.com",
213 | ],
214 | biblioreads: [
215 | "biblioreads.eu.org",
216 | "biblioreads.vercel.app",
217 | "biblioreads.mooo.com",
218 | "bl.vern.cc",
219 | "biblioreads.lunar.icu",
220 | "read.seitan-ayoub.lol",
221 | ],
222 | binternet: [
223 | "binternet.ahwx.org",
224 | "bn.bloat.cat",
225 | "bn.opnxng.com",
226 | "bn.vern.cc",
227 | ],
228 | breezewiki: [
229 | "breezewiki.com",
230 | "antifandom.com",
231 | "breezewiki.pussthecat.org",
232 | "bw.hamstro.dev",
233 | "bw.projectsegfau.lt",
234 | "breeze.hostux.net",
235 | "bw.artemislena.eu",
236 | "breezewiki.woodland.cafe",
237 | "breeze.nohost.network",
238 | "z.opnxng.com",
239 | "breezewiki.catsarch.com",
240 | "breeze.mint.lgbt",
241 | "breezewiki.lunar.icu",
242 | "fandom.adminforge.de",
243 | ],
244 | dumb: [
245 | "dumb.privacydev.net",
246 | "db.vern.cc",
247 | "sing.whatever.social",
248 | "dumb.lunar.icu",
249 | ],
250 | intellectual: [
251 | "intellectual.insprill.net",
252 | "in.bloat.cat",
253 | "in2.bloat.cat",
254 | "intellectual.lumaeris.com",
255 | ],
256 | invidious: [
257 | "yewtu.be",
258 | "vid.puffyan.us",
259 | "yt.artemislena.eu",
260 | "invidious.flokinet.to",
261 | "invidious.projectsegfau.lt",
262 | "invidious.privacydev.net",
263 | "iv.ggtyler.dev",
264 | "invidious.lunar.icu",
265 | "inv.tux.pizza",
266 | "invidious.protokolla.fi",
267 | "proxied.invidious.fi",
268 | "onion.tube",
269 | "invidious.no-logs.com",
270 | "invidious.io.lol",
271 | "iv.nboeck.de",
272 | "invidious.private.coffee",
273 | "invidious.asir.dev",
274 | "iv.datura.network",
275 | "invidious.perennialte.ch",
276 | "yt.cdaut.de",
277 | "invidious.einfachzocken.eu",
278 | "yt.drgnz.club",
279 | ],
280 | piped: [
281 | "piped.video",
282 | "cf.piped.video",
283 | "fl.piped.video",
284 | "do.piped.video",
285 | "az.piped.video",
286 | "piped.mha.fi",
287 | "watch.leptons.xyz",
288 | "piped.lunar.icu",
289 | "piped.r4fo.com",
290 | "piped.privacydev.net",
291 | "piped.smnz.de",
292 | "piped.adminforge.de",
293 | "piped.astartes.nl",
294 | "piped.osphost.fi",
295 | "pi.ggtyler.dev",
296 | "piped.seitan-ayoub.lol",
297 | "yt.owo.si",
298 | "piped.minionflo.net",
299 | ],
300 | libmedium: [
301 | "libmedium.batsense.net",
302 | "md.vern.cc",
303 | "medium.hostux.net",
304 | "libmedium.ducks.party",
305 | ],
306 | libreddit: [
307 | "redditor.fly.dev",
308 | "libreddit.kavin.rocks",
309 | "libreddit.northboot.xyz",
310 | "libreddit.kylrth.com",
311 | "libreddit.tiekoetter.com",
312 | "l.opnxng.com",
313 | "libreddit.projectsegfau.lt",
314 | "libreddit.privacydev.net",
315 | "libreddit.freedit.eu",
316 | "libreddit.mha.fi",
317 | "lr.artemislena.eu",
318 | "libreddit.nohost.network",
319 | "libreddit.lunar.icu",
320 | "snoo.habedieeh.re",
321 | "libreddit.tux.pizza",
322 | "libreddit.perennialte.ch",
323 | "libreddit.private.coffee",
324 | "lr.seitan-ayoub.lol",
325 | "l.bloat.cat",
326 | ],
327 | libremdb: [
328 | "libremdb.iket.me",
329 | "libremdb.pussthecat.org",
330 | "ld.vern.cc",
331 | "binge.whatever.social",
332 | "libremdb.lunar.icu",
333 | "libremdb.jeikobu.net",
334 | "libremdb.nerdyfam.tech",
335 | "libremdb.tux.pizza",
336 | "d.opnxng.com",
337 | "libremdb.catsarch.com",
338 | ],
339 | librey: [
340 | "search.ahwx.org",
341 | "ly.owo.si",
342 | "librey.danyaal.xyz",
343 | "librey.org",
344 | "search.davidovski.xyz",
345 | "search.funami.tech",
346 | "librex.nohost.network",
347 | "search.pabloferreiro.es",
348 | "librey.baczek.me",
349 | "search.seitan-ayoub.lol",
350 | ],
351 | lingva: [
352 | "lingva.ml",
353 | "lingva.thedaviddelta.com",
354 | "lingva.retiolus.net",
355 | "translate.plausibility.cloud",
356 | "lingva.lunar.icu",
357 | "lingva.garudalinux.org",
358 | "lingva.seitan-ayoub.lol",
359 | ],
360 | mediumrip: ["medium.rip"],
361 | neuters: ["neuters.de", "nu.vern.cc"],
362 | nitter: [
363 | "nitter.net",
364 | "nitter.unixfox.eu",
365 | "nitter.poast.org",
366 | "nitter.privacydev.net",
367 | "nitter.projectsegfau.lt",
368 | "nitter.soopy.moe",
369 | "nitter.rawbit.ninja",
370 | "nitter.freedit.eu",
371 | "nitter.nohost.network",
372 | "nitter.io.lol",
373 | "nitter.woodland.cafe",
374 | "nitter.perennialte.ch",
375 | "nitter.salastil.com",
376 | "n.opnxng.com",
377 | "nitter.ktachibana.party",
378 | ],
379 | pixivfe: [
380 | "pixivfe.drgns.space",
381 | "pixivfe.ducks.party",
382 | "pixiv.perennialte.ch",
383 | ],
384 | proxitok: [
385 | "proxitok.pabloferreiro.es",
386 | "proxitok.pussthecat.org",
387 | "tok.habedieeh.re",
388 | "proxitok.privacydev.net",
389 | "tok.artemislena.eu",
390 | "tok.adminforge.de",
391 | "cringe.whatever.social",
392 | "proxitok.lunar.icu",
393 | "proxitok.privacy.com.de",
394 | "cringe.seitan-ayoub.lol",
395 | "tt.opnxng.com",
396 | "tiktok.wpme.pl",
397 | ],
398 | quetre: [
399 | "quetre.iket.me",
400 | "qr.vern.cc",
401 | "quetre.pussthecat.org",
402 | "quetre.privacydev.net",
403 | "ask.habedieeh.re",
404 | "quetre.blackdrgn.nl",
405 | "quetre.lunar.icu",
406 | "q.opnxng.com",
407 | "quetre.rootdo.org",
408 | "quora.seitan-ayoub.lol",
409 | "ask.sudovanilla.org",
410 | "quetre.smnz.de",
411 | ],
412 | rimgo: [
413 | "rimgo.totaldarkness.net",
414 | "imgur.artemislena.eu",
415 | "rimgo.lunar.icu",
416 | "imgur.010032.xyz",
417 | "rimgo.kling.gg",
418 | "rimgo.projectsegfau.lt",
419 | "rimgo.nohost.network",
420 | "rimgo.catsarch.com",
421 | "rimgo.quantenzitrone.eu",
422 | ],
423 | scribe: [
424 | "scribe.rip",
425 | "scribe.citizen4.eu",
426 | "scribe.nixnet.services",
427 | "scribe.privacyredirect.com",
428 | "scribe.projectsegfau.lt",
429 | "scribe.rawbit.ninja",
430 | "m.opnxng.com",
431 | ],
432 | teddit: [
433 | "i.opnxng.com",
434 | "teddit.net",
435 | "teddit.rawbit.ninja",
436 | "teddit.pussthecat.org",
437 | "teddit.zaggy.nl",
438 | "t.sneed.network",
439 | "td.vern.cc",
440 | ],
441 | tent: ["tent.sny.sh", "tent.bloat.cat", "tn.vern.cc"],
442 | tubo: ["tubo.media", "tubo.reallyaweso.me", "tubo.ducks.party"],
443 | wikiless: [
444 | "wikiless.tiekoetter.com",
445 | "wikiless.funami.tech",
446 | "wl.vern.cc",
447 | "wiki.froth.zone",
448 | "wikiless.northboot.xyz",
449 | "wikiless.rawbit.ninja",
450 | "wiki.adminforge.de",
451 | "wikiless.rootdo.org",
452 | "w.sneed.network",
453 | "wikiless.r4fo.com",
454 | "wiki.seitan-ayoub.lol",
455 | "wikiless.ditatompel.com",
456 | ],
457 | safetwitch: [
458 | "safetwitch.drgns.space",
459 | "safetwitch.projectsegfau.lt",
460 | "safetwitch.datura.network",
461 | "ttv.vern.cc",
462 | "twitch.seitan-ayoub.lol",
463 | "st.ggtyler.dev",
464 | "safetwitch.lunar.icu",
465 | "safetwitch.r4fo.com",
466 | "safetwitch.ducks.party",
467 | "safetwitch.nogafam.fr",
468 | "safetwitch.privacyredirect.com",
469 | ],
470 | searx: [
471 | "searx.gnu.style",
472 | "searx.nixnet.services",
473 | "search.projectsegfau.lt",
474 | "searx.roflcopter.fr",
475 | "northboot.xyz",
476 | "opnxng.com",
477 | ],
478 | searxng: [
479 | "search.sapti.me",
480 | "priv.au",
481 | "search.demoniak.ch",
482 | "www.gruble.de",
483 | "searx.divided-by-zero.eu",
484 | "xo.wtf",
485 | "freesearch.club",
486 | "baresearch.org",
487 | "searx.perennialte.ch",
488 | "searx.techsaviours.org",
489 | "search.mdosch.de",
490 | "searx.si",
491 | "searx.namejeff.xyz",
492 | "search.ononoki.org",
493 | "etsi.me",
494 | "searx.work",
495 | "search.smnz.de",
496 | "searx.prvcy.eu",
497 | "searx.headpat.exchange",
498 | ],
499 | hackernews: {
500 | better: "better-hackernews.vercel.app",
501 | worker: "news.workers.tools",
502 | },
503 | mozhi: [
504 | "mozhi.aryak.me",
505 | "nyc1.mz.ggtyler.dev",
506 | "translate.projectsegfau.lt",
507 | "translate.nerdvpn.de",
508 | "mozhi.ducks.party",
509 | "mozhi.pussthecat.org",
510 | "mozhi.adminforge.de",
511 | "translate.privacyredirect.com",
512 | "mozhi.canine.tools",
513 | "mozhi.gitro.xyz",
514 | ],
515 | skunkyart: [
516 | "art.bloat.cat",
517 | "skunky.bloat.cat",
518 | "lost-skunk.cc/skunkyart",
519 | "skunkyart.lumaeris.com",
520 | ],
521 | priviblur: [
522 | "pb.bloat.cat",
523 | "tb.opnxng.com",
524 | "priviblur.pussthecat.org",
525 | "priviblur.thebunny.zone",
526 | "priviblur.gitro.xyz",
527 | "priviblur.canine.tools",
528 | ],
529 | };
530 |
531 | let farsideInstance = keepHistory ? "farside.link/_" : "farside.link";
532 |
533 | // // // // // // // // // // // // //
534 |
535 | const hash = window.location.hash,
536 | scheme = `${window.location.protocol}//`;
537 |
538 | let debug_mode = false;
539 |
540 | if (debug_mode) {
541 | alert(
542 | "\n== DEBUG MODE IS ON ==" +
543 | "\nIf you're seeing this" +
544 | "\nset the debug_mode value to" +
545 | "\nfalse for Privacy Redirector." +
546 | "\n======================" +
547 | "\n\nHostname: " +
548 | window.location.hostname +
549 | "\nPath: " +
550 | window.location.pathname +
551 | "\nQuery: " +
552 | window.location.search +
553 | "\nHash: " +
554 | hash,
555 | );
556 | }
557 |
558 | let selectedInstance = "",
559 | newURL = "";
560 |
561 | const getrandom = async (instances) =>
562 | instances[Math.floor(Math.random() * instances.length)];
563 |
564 | async function redirectInstagram() {
565 | if (instagram[0]) {
566 | window.stop();
567 | let pathname = window.location.pathname;
568 | let search = window.location.search;
569 | let params = new URLSearchParams(search);
570 |
571 | selectedInstance = await getrandom(Instances.proxigram);
572 |
573 | switch (true) {
574 | case pathname.startsWith("/accounts/login/"):
575 | case pathname.startsWith("/accounts/signup/"):
576 | pathname = pathname.replace(/^\/accounts\/(login|signup)\/[a-z]*/, "");
577 | params.delete("next");
578 | search = params.size ? `?${params}` : "";
579 | break;
580 | case pathname.startsWith("/reel/"):
581 | case pathname.startsWith("/tv/"):
582 | pathname = pathname.replace(/^\/(reel|tv)\//, "/p/");
583 | break;
584 | case pathname.endsWith("/reels/"):
585 | pathname = pathname.replace("/reels", "");
586 | break;
587 | }
588 | newURL = `${scheme}${selectedInstance}${pathname}${search}${hash}`;
589 | window.location.replace(newURL);
590 | }
591 | }
592 |
593 | async function redirectTwitter() {
594 | if (twitter[0]) {
595 | window.stop();
596 |
597 | const pathname = window.location.pathname;
598 | let searchpath = `${pathname}${window.location.search}`;
599 |
600 | selectedInstance = twitter[1]
601 | ? `${farsideInstance}/nitter`
602 | : await getrandom(Instances.nitter);
603 |
604 | if (pathname === "/i/flow/login")
605 | searchpath = searchpath.replace(
606 | "/i/flow/login?redirect_after_login=",
607 | "",
608 | );
609 |
610 | if (searchpath.includes("%")) searchpath = decodeURIComponent(searchpath);
611 |
612 | newURL = `${scheme}${selectedInstance}${searchpath}${hash}`;
613 | window.location.replace(newURL);
614 | }
615 | }
616 |
617 | async function redirectReddit() {
618 | if (reddit[0] && !window.location.pathname.startsWith("/domain")) {
619 | window.stop();
620 | let pathname = window.location.pathname;
621 | let search = window.location.search;
622 |
623 | selectedInstance = reddit[1]
624 | ? `${farsideInstance}/${redditFrontend}`
625 | : await getrandom(Instances[redditFrontend]);
626 |
627 | if (pathname === "/media" && search) {
628 | const params = new URLSearchParams(search);
629 | const mediaURL = new URL(params.get("url"));
630 | if (["i.redd.it", "preview.redd.it"].includes(mediaURL.hostname)) {
631 | pathname = `/img${mediaURL.pathname}`;
632 | search = mediaURL.search;
633 | }
634 | }
635 | newURL = `${scheme}${selectedInstance}${pathname}${search}${hash}`;
636 |
637 | window.location.replace(newURL);
638 | }
639 | }
640 |
641 | async function redirectYoutube(frontend) {
642 | if (youtube[0]) {
643 | window.stop();
644 | let searchpath = `${window.location.pathname}${window.location.search}`;
645 | if (window.location.pathname.startsWith("/embed")) {
646 | selectedInstance = youtube[1]
647 | ? `${farsideInstance}/invidious`
648 | : await getrandom(Instances["invidious"]);
649 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
650 | window.location.search
651 | }${hash}`;
652 | window.location.replace(newURL);
653 | } else {
654 | if (frontend === "tubo") {
655 | selectedInstance = await getrandom(Instances.tubo);
656 |
657 | searchpath = `/stream?url=${window.location.href}`;
658 | if (
659 | window.location.pathname.startsWith("/@") ||
660 | window.location.pathname.startsWith("/channel")
661 | )
662 | searchpath = `/channel?url=${window.location.href}`;
663 | } else if (frontend === "freetube") {
664 | let youtube_link = window.location.href;
665 | window.location.replace(`freetube://${youtube_link}`);
666 | return;
667 | } else {
668 | selectedInstance =
669 | youtube[1] && frontend !== "hyperpipe"
670 | ? `${farsideInstance}/${frontend}`
671 | : await getrandom(Instances[frontend]);
672 | }
673 |
674 | newURL = `${scheme}${selectedInstance}${searchpath}${hash}`;
675 | window.location.replace(newURL);
676 | }
677 | }
678 | }
679 |
680 | async function redirectTiktok() {
681 | if (tiktok[0]) {
682 | window.stop();
683 | let pathname = window.location.pathname;
684 | selectedInstance = tiktok[1]
685 | ? `${farsideInstance}/proxitok`
686 | : await getrandom(Instances.proxitok);
687 |
688 | await Promise.any(
689 | [
690 | ["/@/", "/@placeholder/"],
691 | ["/discover/", "/tag/"],
692 | ["/foryou", "/trending"],
693 | ].map(async ([key, value]) => {
694 | if (pathname.startsWith(key)) pathname = pathname.replace(key, value);
695 | }),
696 | );
697 |
698 | newURL = `${scheme}${selectedInstance}${pathname}${window.location.search}${
699 | hash
700 | }`;
701 | window.location.replace(newURL);
702 | }
703 | }
704 |
705 | async function redirectImgur() {
706 | if (imgur[0]) {
707 | window.stop();
708 |
709 | selectedInstance = imgur[1]
710 | ? `${farsideInstance}/rimgo`
711 | : await getrandom(Instances.rimgo);
712 |
713 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
714 | window.location.search
715 | }${hash}`;
716 |
717 | window.location.replace(newURL);
718 | }
719 | }
720 |
721 | async function redirectMedium(frontend) {
722 | if (medium[0]) {
723 | let pathname = window.location.pathname;
724 | const host_path = `${window.location.hostname}${pathname}`;
725 |
726 | if (
727 | (/^.+?\.medium\.com\/.+/.test(host_path) ||
728 | /^\/@?[^\/]+?\//.test(pathname) ||
729 | host_path === "medium.com/") &&
730 | !(
731 | /^\/(tag|m|hc)\//.test(pathname) ||
732 | /\/(about|followers|following)/.test(pathname)
733 | )
734 | ) {
735 | window.stop();
736 | selectedInstance =
737 | medium[1] && frontend === "scribe"
738 | ? `${farsideInstance}/scribe`
739 | : await getrandom(Instances[frontend]);
740 | const username = window.location.hostname.replace(/\.?medium\.com/, "");
741 | if (username) pathname = `/${username}${pathname}`;
742 | newURL = `${scheme}${selectedInstance}${pathname}${
743 | window.location.search
744 | }${hash}`;
745 | window.location.replace(newURL);
746 | }
747 | }
748 | }
749 |
750 | async function redirectHackerNews() {
751 | if (hackernews[0]) {
752 | let pathname = window.location.pathname;
753 | if (
754 | ["/newest", "/item", "/user", "/ask", "/show", "/jobs", "/"].includes(
755 | pathname,
756 | )
757 | ) {
758 | if (
759 | hackernewsFrontend === "better" &&
760 | window.location.pathname === "/newest"
761 | )
762 | pathname = "/new";
763 | selectedInstance = Instances.hackernews[hackernewsFrontend];
764 | } else if (
765 | ["/best", "/news", "/submitted", "/threads", "/classic"].includes(
766 | pathname,
767 | )
768 | ) {
769 | selectedInstance = Instances.hackernews.worker;
770 | }
771 | if (selectedInstance) {
772 | window.stop();
773 | newURL = `${scheme}${selectedInstance}${pathname}${window.location.search}`;
774 | window.location.replace(newURL);
775 | }
776 | }
777 | }
778 |
779 | async function redirectGTranslate() {
780 | if (gtranslate[0]) {
781 | window.stop();
782 | let pathname = window.location.pathname;
783 |
784 | switch (googleTranslateFrontend) {
785 | case "lingva":
786 | selectedInstance = gtranslate[1]
787 | ? `${farsideInstance}/lingva`
788 | : await getrandom(Instances.lingva);
789 |
790 | if (window.location.search) {
791 | const params = new URLSearchParams(window.location.search);
792 | pathname = `/${params.get("sl")}/${params.get("tl")}/${params.get(
793 | "text",
794 | )}`;
795 | } else if (/^\/\w+?\/\w+?\/.*/.test(pathname)) {
796 | pathname = pathname.replace(/\+/g, " ");
797 | }
798 | newURL = `${scheme}${selectedInstance}${pathname}`;
799 | break;
800 |
801 | case "mozhi":
802 | selectedInstance = await getrandom(Instances.mozhi);
803 |
804 | if (window.location.search) {
805 | const params = new URLSearchParams(window.location.search);
806 | pathname = `?text=${params.get(
807 | "text",
808 | )}&from=${params.get("sl")}&to=${params.get("tl")}&engine=google`;
809 | newURL = `${scheme}${selectedInstance}${pathname}`;
810 | } else {
811 | newURL = `${scheme}${selectedInstance}`;
812 | }
813 | break;
814 |
815 | default:
816 | break;
817 | }
818 |
819 | window.location.replace(newURL);
820 | }
821 | }
822 |
823 | async function redirectDeviantart() {
824 | window.stop();
825 | let pathname = window.location.pathname;
826 | let query = window.location.search;
827 | let parts = pathname.split("/").filter((n) => n);
828 | let pathnameMatch = "";
829 | selectedInstance = await getrandom(Instances.skunkyart);
830 |
831 | let patterns = {
832 | post: /\/art\/\S+/,
833 | tag: /\/tag\/\S+/,
834 | search: /(?<=\?q=)[^&]+/,
835 | gallery: /\/\w+\/gallery$/,
836 | gallery_folder: /\/\w+\/gallery\/\d+/,
837 | favorites: /\/(\w+)\/favourites/,
838 | profile: /^\/(\w+)$/,
839 | };
840 |
841 | if (deviantart[0]) {
842 | if (patterns.post.test(pathname)) {
843 | pathnameMatch = `/post/${parts[0].toLowerCase()}/${parts[2]}`;
844 | } else if (patterns.tag.test(pathname)) {
845 | pathnameMatch = `/search?q=${parts[1]}&type=tag`;
846 | } else if (pathname.startsWith("/search")) {
847 | query = query.match(patterns.search)[0];
848 | pathnameMatch = `/search?q=${query}&type=all`;
849 | } else if (patterns.gallery.test(pathname)) {
850 | pathnameMatch = `/group_user?type=gallery&q=${parts[0]}`;
851 | } else if (patterns.gallery_folder.test(pathname)) {
852 | pathnameMatch = `/group_user?folder=${parts[2]}&q=${parts[0]}&type=g`;
853 | } else if (patterns.favorites.test(pathname)) {
854 | pathnameMatch = `/group_user?q=${pathname.match(patterns.favorites)[1]}&type=favorites`;
855 | } else if (patterns.profile.test(pathname)) {
856 | pathnameMatch = `/group_user?type=about&q=${pathname.match(patterns.profile)[1]}`;
857 | }
858 | }
859 |
860 | newURL = `${scheme}${selectedInstance}${pathnameMatch}`;
861 | window.location.replace(newURL);
862 | }
863 |
864 | async function redirectDeepl() {
865 | if (deepl[0]) {
866 | window.stop();
867 | selectedInstance = await getrandom(Instances.mozhi);
868 | if (window.location.hash) {
869 | let hash_parts = window.location.hash.substring(1).split("/");
870 | let pathname = `?text=${hash_parts[2]}&from=${hash_parts[0]}&to=${
871 | hash_parts[1]
872 | }&engine=deepl`;
873 | newURL = `${scheme}${selectedInstance}${pathname}`;
874 | }
875 |
876 | window.location.replace(newURL);
877 | }
878 | }
879 |
880 | async function redirectTumblr() {
881 | if (tumblr[0]) {
882 | window.stop();
883 | selectedInstance = await getrandom(Instances.priviblur);
884 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
885 | window.location.search
886 | }${hash}`;
887 | window.location.replace(newURL);
888 | }
889 | }
890 |
891 | async function redirectReuters() {
892 | if (reuters[0]) {
893 | window.stop();
894 | selectedInstance = await getrandom(Instances.neuters);
895 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
896 | window.location.search
897 | }${hash}`;
898 | window.location.replace(newURL);
899 | }
900 | }
901 |
902 | async function redirectWikipedia() {
903 | if (wikipedia[0]) {
904 | window.stop();
905 | let langCode = /^([a-z\-]+)\./.exec(window.location.hostname)[1];
906 |
907 | selectedInstance = wikipedia[1]
908 | ? `${farsideInstance}/wikiless`
909 | : await getrandom(Instances.wikiless);
910 |
911 | if (langCode === "www") langCode = "en";
912 | newURL = `${scheme}${selectedInstance}${window.location.pathname}?lang=${
913 | langCode
914 | }${hash}`;
915 | window.location.replace(newURL);
916 | }
917 | }
918 |
919 | async function redirectImdb() {
920 | if (imdb[0]) {
921 | window.stop();
922 |
923 | selectedInstance = imdb[1]
924 | ? `${farsideInstance}/libremdb`
925 | : await getrandom(Instances.libremdb);
926 |
927 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
928 | window.location.search
929 | }${hash}`;
930 |
931 | window.location.replace(newURL);
932 | }
933 | }
934 |
935 | async function redirectQuora() {
936 | if (quora[0]) {
937 | window.stop();
938 |
939 | selectedInstance = quora[1]
940 | ? `${farsideInstance}/quetre`
941 | : await getrandom(Instances.quetre);
942 |
943 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
944 | window.location.search
945 | }${hash}`;
946 |
947 | window.location.replace(newURL);
948 | }
949 | }
950 |
951 | async function redirectFandom() {
952 | if (fandom[0]) {
953 | window.stop();
954 | const fandomName = window.location.hostname.replace(/\..+/, "");
955 | selectedInstance = await getrandom(Instances.breezewiki);
956 |
957 | let pathname = window.location.pathname;
958 | if (fandomName !== "www") pathname = `/${fandomName}${pathname}`;
959 | newURL = `${scheme}${selectedInstance}${pathname}${window.location.search}${
960 | hash
961 | }`;
962 |
963 | window.location.replace(newURL);
964 | }
965 | }
966 |
967 | async function redirectGoogle() {
968 | if (
969 | google[0] &&
970 | window.location.hostname.startsWith("www") &&
971 | window.location.pathname.startsWith("/search")
972 | ) {
973 | window.stop();
974 |
975 | selectedInstance = google[1]
976 | ? `${farsideInstance}/${googleFrontend}`
977 | : (selectedInstance = await getrandom(Instances[googleFrontend]));
978 |
979 | let pathname = window.location.pathname;
980 | if (googleFrontend === "librey" && pathname === "/search")
981 | pathname += ".php";
982 | const params = new URLSearchParams(window.location.search);
983 | const query = params.entries().q;
984 | const search = query ? `?q=${query}` : window.location.search;
985 | newURL = `${scheme}${selectedInstance}${pathname}${search}${hash}`;
986 | window.location.replace(newURL);
987 | }
988 | }
989 |
990 | async function redirectGoodreads() {
991 | if (goodreads[0]) {
992 | window.stop();
993 |
994 | selectedInstance = await getrandom(Instances.biblioreads);
995 |
996 | if (window.location.pathname.startsWith("/search")) {
997 | const params = new URLSearchParams(search);
998 | search = `/${params.get("q")}`;
999 | }
1000 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${search}${
1001 | hash
1002 | }`;
1003 | window.location.replace(newURL);
1004 | }
1005 | }
1006 |
1007 | async function redirectStackoverflow() {
1008 | if (
1009 | stackoverflow[0] &&
1010 | (window.location.pathname.startsWith("/questions/") ||
1011 | window.location.pathname === "/")
1012 | ) {
1013 | window.stop();
1014 | selectedInstance = stackoverflow[1]
1015 | ? `${farsideInstance}/anonymousoverflow`
1016 | : await getrandom(Instances.anonymousoverflow);
1017 |
1018 | newURL = `${scheme}${selectedInstance}${window.location.pathname}${
1019 | window.location.search
1020 | }${hash}`;
1021 | window.location.replace(newURL);
1022 | }
1023 | }
1024 |
1025 | async function redirectBandcamp() {
1026 | if (bandcamp[0]) {
1027 | // thanks to libredirect
1028 |
1029 | selectedInstance = await getrandom(Instances.tent);
1030 | const params = new URLSearchParams(window.location.search);
1031 | const artist = window.location.hostname.replace(/\..+/, "");
1032 | const regex = /^\/([^\/]+?)\/(.+)/.exec(window.location.pathname);
1033 | const audio = /^\/stream\/([a-f0-9]+?)\/([^\/]+?)\/([0-9]+)/.exec(
1034 | window.location.pathname,
1035 | );
1036 | const image = /^\/img\/(.+)/.exec(window.location.pathname);
1037 | let searchpath = "";
1038 |
1039 | switch (true) {
1040 | case window.location.pathname === "/search":
1041 | searchpath = `/search.php?query=${params.get("q")}`;
1042 | break;
1043 | case window.location.hostname.search(/(daily)?\.bandcamp\.com/) > 0:
1044 | if (window.location.pathname === "/") {
1045 | searchpath = `/artist.php?name=${artist}`;
1046 | } else if (regex.length > 2) {
1047 | searchpath = `/release.php?artist=${artist}&type=${regex[1]}&name=${regex[2]}`;
1048 | }
1049 | break;
1050 | case window.location.hostname === "f4.bcbits.com":
1051 | if (image.length > 1) searchpath = `/image.php?file=${image[1]}`;
1052 | break;
1053 | case window.location.hostname === "t4.bcbits.com":
1054 | if (audio.length > 3)
1055 | searchpath = `/audio.php?directory=${audio[1]}&format=${
1056 | audio[2]
1057 | }&file=${audio[3]}&token=${params.get("token")}`;
1058 | break;
1059 | default:
1060 | return;
1061 | }
1062 | window.stop();
1063 | newURL = `${scheme}${selectedInstance}${searchpath}`;
1064 | window.location.replace(newURL);
1065 | }
1066 | }
1067 |
1068 | async function redirectGenius() {
1069 | if (genius[0]) {
1070 | const pathname = window.location.pathname;
1071 | selectedInstance = await getrandom(Instances[geniusFrontend]);
1072 |
1073 | await Promise.any(
1074 | [
1075 | ["lyrics", pathname.endsWith("-lyrics")],
1076 | ["album", pathname.startsWith("/albums/")],
1077 | ["artist", pathname.startsWith("/artists/")],
1078 | [, ["/", "/search"].includes(pathname)],
1079 | ].map(async ([key, value]) => {
1080 | if (value) {
1081 | const searchpath =
1082 | geniusFrontend === "intellectual" && key
1083 | ? `/${key}?path=${pathname.slice(1)}`
1084 | : `${pathname}${window.location.search}`;
1085 | window.stop();
1086 | newURL = `${scheme}${selectedInstance}${searchpath}${hash}`;
1087 | window.location.replace(newURL);
1088 | }
1089 | }),
1090 | );
1091 | }
1092 | }
1093 |
1094 | async function redirectPinterest() {
1095 | if (pinterest[0]) {
1096 | selectedInstance = await getrandom(Instances.binternet);
1097 |
1098 | let searchpath = "";
1099 | if (window.location.hostname === "i.pinimg.com") {
1100 | searchpath = `/image_proxy.php?url=${window.location.href}`;
1101 | } else if (window.location.pathname.startsWith("/search")) {
1102 | searchpath = `${window.location.pathname
1103 | .replace("search", "search.php")
1104 | .replace("/pins/", "")}${window.location.search}`;
1105 | } else if (window.location.pathname !== "/") return;
1106 |
1107 | window.stop();
1108 | newURL = `${scheme}${selectedInstance}${searchpath}`;
1109 | window.location.replace(newURL);
1110 | }
1111 | }
1112 |
1113 | async function redirectSoundcloud() {
1114 | if (soundcloud[0]) {
1115 | window.stop();
1116 | selectedInstance = await getrandom(Instances.tubo);
1117 |
1118 | let searchpath = "/kiosk?serviceId=1";
1119 | if (window.location.pathname !== "/")
1120 | searchpath = `/stream?url=${window.location.href}`;
1121 | newURL = `${scheme}${selectedInstance}${searchpath}`;
1122 | window.location.replace(newURL);
1123 | }
1124 | }
1125 |
1126 | async function redirectPixiv() {
1127 | if (pixiv[0]) {
1128 | window.stop();
1129 | selectedInstance = await getrandom(Instances.pixivfe);
1130 |
1131 | const pathname = window.location.pathname.replace(/^\/\w{2}\//, "/");
1132 | newURL = `${scheme}${selectedInstance}${pathname}${window.location.search}`;
1133 | window.location.replace(newURL);
1134 | }
1135 | }
1136 |
1137 | async function redirectTwitch() {
1138 | if (twitch[0]) {
1139 | window.stop();
1140 | selectedInstance = await getrandom(Instances.safetwitch);
1141 |
1142 | const pathname =
1143 | window.location.pathname == "/search"
1144 | ? window.location.pathname + "/"
1145 | : window.location.pathname;
1146 |
1147 | let searchpath =
1148 | window.location.pathname == "/search"
1149 | ? window.location.search.replace("term", "query")
1150 | : window.location.search;
1151 |
1152 | newURL = `${scheme}${selectedInstance}${pathname}${searchpath}`;
1153 | window.location.replace(newURL);
1154 | }
1155 | }
1156 |
1157 | const urlHostname = window.location.hostname;
1158 |
1159 | switch (urlHostname) {
1160 | case "www.instagram.com":
1161 | redirectInstagram();
1162 | break;
1163 |
1164 | case "twitter.com":
1165 | case "mobile.twitter.com":
1166 | case "x.com":
1167 | case "mobile.x.com":
1168 | redirectTwitter();
1169 | break;
1170 |
1171 | case "www.youtube.com":
1172 | case "m.youtube.com":
1173 | case "www.youtube-nocookie.com":
1174 | redirectYoutube(youtubeFrontend);
1175 | break;
1176 |
1177 | case "www.tiktok.com":
1178 | redirectTiktok();
1179 | break;
1180 |
1181 | case "music.youtube.com":
1182 | redirectYoutube(youtubeMusicFrontend);
1183 | break;
1184 |
1185 | case "news.ycombinator.com":
1186 | redirectHackerNews();
1187 | break;
1188 |
1189 | case "translate.google.com":
1190 | redirectGTranslate();
1191 | break;
1192 |
1193 | case "www.reuters.com":
1194 | redirectReuters();
1195 | break;
1196 |
1197 | case "www.imdb.com":
1198 | case "m.imdb.com":
1199 | redirectImdb();
1200 | break;
1201 |
1202 | case "www.quora.com":
1203 | redirectQuora();
1204 | break;
1205 |
1206 | case "www.google.com":
1207 | redirectGoogle();
1208 | break;
1209 |
1210 | case "www.goodreads.com":
1211 | redirectGoodreads();
1212 | break;
1213 |
1214 | case "genius.com":
1215 | redirectGenius();
1216 | break;
1217 |
1218 | case "stackoverflow.com":
1219 | redirectStackoverflow();
1220 | break;
1221 |
1222 | case "f4.bcbits.com":
1223 | case "t4.bcbits.com":
1224 | redirectBandcamp();
1225 | break;
1226 |
1227 | case "www.deviantart.com":
1228 | redirectDeviantart();
1229 | break;
1230 |
1231 | case "i.pinimg.com":
1232 | redirectPinterest();
1233 | break;
1234 |
1235 | case "soundcloud.com":
1236 | case "m.soundcloud.com":
1237 | redirectSoundcloud();
1238 | break;
1239 |
1240 | case "www.pixiv.net":
1241 | redirectPixiv();
1242 | break;
1243 |
1244 | case "www.deepl.com":
1245 | redirectDeepl();
1246 | break;
1247 |
1248 | case "twitch.tv":
1249 | case "www.twitch.tv":
1250 | redirectTwitch();
1251 | break;
1252 |
1253 | case urlHostname.includes("reddit.com") ? urlHostname : 0:
1254 | redirectReddit();
1255 | break;
1256 |
1257 | case urlHostname.includes("medium.com") ? urlHostname : 0:
1258 | redirectMedium(mediumFrontend);
1259 | break;
1260 |
1261 | case urlHostname.includes("imgur.com") ? urlHostname : 0:
1262 | case urlHostname.includes("imgur.io") ? urlHostname : 0:
1263 | redirectImgur();
1264 | break;
1265 |
1266 | case urlHostname.includes("wikipedia.org") ? urlHostname : 0:
1267 | redirectWikipedia();
1268 | break;
1269 |
1270 | case urlHostname.includes("fandom.com") ? urlHostname : 0:
1271 | redirectFandom();
1272 | break;
1273 |
1274 | case urlHostname.includes("bandcamp.com") ? urlHostname : 0:
1275 | redirectBandcamp();
1276 | break;
1277 |
1278 | case urlHostname.includes("pinterest.com") ? urlHostname : 0:
1279 | redirectPinterest();
1280 | break;
1281 |
1282 | case urlHostname.includes("tumblr.com") ? urlHostname : 0:
1283 | redirectTumblr();
1284 | break;
1285 | }
1286 |
1287 | // export module for the test in github action
1288 | typeof module !== "undefined"
1289 | ? (module.exports = { Instances: Instances })
1290 | : true;
1291 |
--------------------------------------------------------------------------------