Skip to content

Instantly share code, notes, and snippets.

@Tekl
Tekl / text-fragment-bookmarklet.js
Last active January 24, 2024 13:07
Bookmarklets für Safari
//bookmarklet_title: Text-Fragment-Link
//bookmarklet_about: Dieses Bookmarklet erzeugt einen Link, der den ausgewählten Text als Text-Fragment hinter die URL der aktuellen Seite hängt. Besucht man einen solchen Link mit Safari oder Google Chrome, springt der Browser automatisch zur zuvor markierten Textstelle. Ziehen Sie uur Installation des Bookmarklets den unteren Button in die Favoritenleiste. Falls sie nicht sichtbar ist, einfach ⇧⌘B drücken.
var u = window.location.href + "#:~:text=" + encodeURIComponent(window.getSelection().toString());
navigator.clipboard.writeText(u);
if (confirm("URL mit Text-Fragment in Zwischenablage kopiert. Im neuen Tab öffnen?")) {
window.open(u,"_blank")
};
void(0);
@Tekl
Tekl / Surround Lines with Tags….applescript
Last active February 9, 2023 14:35
Script for BBEdit (https://www.barebones.com/products/bbedit/) to surround lines with HTML tags or some sort of Markdown markup
--
-- Created by: Wolfgang Kreutz
-- Version 1.0 for BBEdit from 09.02.23
--
-- © 2023 Wolfgang Kreutz • https://tekl.de
--
-- This Script only works in the text and code editor BBEdit for macOS (https://www.barebones.com/products/bbedit/).
-- It surrounds every line in the selection with HTML tags or some sort of Markdown markup like links, lists and headlines.
-- If you enter a HTML tag with attributes, the script will remove them for the closing tag.
--
@Tekl
Tekl / Surround Lines with Tags….applescript
Last active February 9, 2023 13:21
Script for CotEditor (https://github.com/coteditor/CotEditor) to surround lines with HTML tags or some sort of Markdown markup
--
-- Created by: Wolfgang Kreutz
-- Version 1.0 for CotEditor from 09.02.23
--
-- © 2023 Wolfgang Kreutz • https://tekl.de
--
-- This Script only works in the text and code editor CotEditor for macOS (https://github.com/coteditor/CotEditor).
-- It surrounds every line in the selection with HTML tags or some sort of Markdown markup like links, lists and headlines.
-- If you enter a HTML tag with attributes, the script will remove them for the closing tag.
--
@Tekl
Tekl / AdGuard_clickbait-blocker.txt
Last active May 12, 2020 17:38
Clickbait Blocker for AdGuard
! Title: Clickbait Blocker for AdGuard
! Block domains which are known of publishing clickbait articles und using misleading headlines.
! Version: 1.0.0
! TimeUpdated: 2020-04-10T15:55:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Filter URL: https://gist.github.com/Tekl/b9eb6dd5aba83d5e8115c25fcdbed204/raw/AdGuard_clickbait-blocker.txt
!
||futurezone.de^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by AdGuard Clickbait Blocker<\/h2>/s
||heftig.de^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by AdGuard Clickbait Blocker<\/h2>/s
@Tekl
Tekl / AdGuard_facebook-blocker.txt
Last active March 11, 2020 16:01
Completely Block Facebook with AdGuard
! Title: Facebook Blocker for AdGuard
! Completely Block Facebook (based on on the hosts file by jmdugan)
! Version: 1.0.3
! TimeUpdated: 2020-03-11T17:00:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Filter URL: https://gist.github.com/Tekl/89f132fc7259a1d28a47ceecfccdc71d/raw/AdGuard_facebook-blocker.txt
||facebook.com^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Facebook Blocker for AdGuard<\/h2>/s
||facebook.net^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Facebook Blocker for AdGuard<\/h2>/s
@Tekl
Tekl / AdGuard_shutup-css.txt
Last active July 4, 2020 23:09
Block a lot of comments on popular websites with AdGuard (based on shutup.css)
! Title: Shut Up Comments with AdGuard
! Block a lot of comments on popular websites (based on shutup.css)
! Version: 1.0.5
! TimeUpdated: 2020-07-05T17:05:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Source: https://github.com/panicsteve/shutup-css/blob/master/shutup.css
! Filter URL: https://gist.github.com/Tekl/b770c29529b0530ae7ceb09266ba7665/raw/AdGuard_shutup-css.txt
!!/* YouTube */
@Tekl
Tekl / AdGuard_promi-and-celebrity-news-blocker.txt
Last active April 9, 2020 08:31
Promi and Celebrity News Blocker for AdGuard
! Title: Promi and Celebrity News Blocker for AdGuard
! Filter domains which are know of publishing bullshit news about so-called celebrities
! Version: 1.0.6
! TimeUpdated: 2020-04-09T09:41:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Filter URL: https://gist.github.com/Tekl/0e3422fd26791f27b62687f6450dc538/raw/AdGuard_promi-and-celebrity-news-blocker.txt
||allaboutthetea.com^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Promi and Celebrity News Blocker for AdGuard<\/h2>/s
||allabouttrh.com^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Promi and Celebrity News Blocker for AdGuard<\/h2>/s
@Tekl
Tekl / AdGuard_fake-news-extremism-blocker.txt
Last active October 13, 2022 15:16
Fake News and Extremism Blocker for AdGuard
! Title: Fake News and Extremism Blocker for AdGuard
! Block domains which are known of publishing fake news, desinformation and extremist content. The domains are from different sources and I haven't checked them all if they really publish fake news and extreme content. I've created this list just for my convenience. Feel free to download, edit and republish this list, if you have different opinions about several pages. I'm not fluent in English. In my understanding Extremism include far-right and far-left positions.
! Version: 1.0.6
! TimeUpdated: 2020-04-10T15:55:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Filter URL: https://gist.github.com/Tekl/9d6e2732a081af86df7cf93482bced01/raw/AdGuard_fake-news-extremism-blocker.txt
!
!Altherren-Journalismus (Germany)
!
@Tekl
Tekl / AdGuard_Axel-Springer-Blocker.txt
Last active June 17, 2020 14:00
AdGuard Blocker for mostly german News pages, Clickbait pages and Celebrity news
! Title: Axel Springer Blocker for AdGuard
! Block everything from Axel Springer
! Version: 1.0.4
! TimeUpdated: 2020-06-17T17:00:00+01:00
! Expires: 4 days (update frequency)
! Homepage: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9
! Filter URL: https://gist.github.com/Tekl/bf4cfc6513a1c1e787ec49ab54f0d8c9/raw/AdGuard_Axel-Springer-Blocker.txt
||amiado.com^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Axel Springer Blocker for AdGuard<\/h2>/s
||amiadogroup.com^$replace=/^.*$/<h2 style="font-family:sans-serif;background:#c00;color:#fff;padding:1em;text-align:center">Blocked by Axel Springer Blocker for AdGuard<\/h2>/s