From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4EanIk8aW2fkqgAAe85BDQ:P1 (envelope-from ) for ; Thu, 12 Dec 2024 17:15:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 4EanIk8aW2fkqgAAe85BDQ (envelope-from ) for ; Thu, 12 Dec 2024 18:15:59 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZwtQ5npT; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734023759; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=gEyhU2+2B2I5D73s0wxVtsHKy8DoiFV9UZ5q6GfmHTU=; b=khfVb4rmW3nhHSKFAaMZLrkyMVpf2oT9ZN+4zs2ZMqPOPtNDQbGDS7wUhnoZ3Pu+bQXWYj eVrj92qjPZLDqFClDUsyMYywXGx3zqcOAJYPrNUxnfM9fMp7dsR0P7K5i6DvvzOLPanOcl LbzQkQiFnOeADlw7jevu3x37kSqejt/k7CGk39xpPULxuExppuBVgTNMo6uj8IKu5i/s5o IN3jeVQkHHRKbcMaLTf+00ddzlT+hTB5EmeTjQnDI3PLKcmUHnrEhbaBnCYlFPmJE2uV7v H5ri00S8SNR38utoVdtlbNISUNQmdXuXuXJB8gYLvZBmoHEpvVMBdYb3Bf4CgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZwtQ5npT; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734023759; a=rsa-sha256; cv=none; b=AvtzeH812kou7lwRQifJLcZXDPyAnutgePuXF1cKNafGfoKx65Juj4XiseKu8rT3KgP7/7 i7qZ67DxsloJsH0cfS787up71U6x/Ha7FwK7uTq8eE+JEiMqYEUn9Ukyz9oTs4eAsEHoBF kJphNJCpasgBljRCmUqsOX1YcG76gdLFAeXNeteIl3rEJoGMv5s83U+ixVFFwLc+VxAPjd HqUXWB3h0XM1IeogiW3E9lssBv+ORsynzTvzmN+7KMfMZ+mnmlB8o2A+f1/hriw94bYYKk NmzdDyNNMgNnsRAUE/ffoM22pgpjpB2WGxPRrkzse+aYNgjSatXbEVg3S+QtHw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 55FDF40E9E for ; Thu, 12 Dec 2024 18:15:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLmmQ-0004cK-Rs; Thu, 12 Dec 2024 12:15:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLmmO-0004ao-Kb for emacs-orgmode@gnu.org; Thu, 12 Dec 2024 12:15:13 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLmmM-00042f-Ae for emacs-orgmode@gnu.org; Thu, 12 Dec 2024 12:15:12 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-216401de828so8286235ad.3 for ; Thu, 12 Dec 2024 09:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734023709; x=1734628509; darn=gnu.org; h=mime-version:message-id:date:user-agent:references:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=gEyhU2+2B2I5D73s0wxVtsHKy8DoiFV9UZ5q6GfmHTU=; b=ZwtQ5npTgRZgmX/tG5bmX1FRjAZaWT6MjC25hWOjFidsfWEiDdM2UwxppWKGk9jqtC V1IAtcwdLufTsXbsylNV3NwqpuC7+HO/df53HMWW/R/uI88a7HqtrcA5dzQPP0SgmtUL B7H2Gdxm0BWy2unFUvBeFUY3C2STyBWxd7pyETGESZQMEbuAxu6x921LWn1056SgMoj0 po0pCAHC6JmIbgfW4DaLSFV/jzyJbezH7kJWrOM8ETgsjMdhaTIxQM2ooC417BcHgTR1 ssnT6XkrJE+XdJLP3Y6pOAtotSup4DgBr8b4wQNQvX7u/zD3PIgYahLKK9RiZBfScq5O Ae+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734023709; x=1734628509; h=mime-version:message-id:date:user-agent:references:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gEyhU2+2B2I5D73s0wxVtsHKy8DoiFV9UZ5q6GfmHTU=; b=MHotKwIVbpExcwk22cEiM59jtF6LM83o0wXM62jl6HAG+TYRlpWpy5el+a37u+Cb71 Xd6d8V0/c7t0WfgQPrAslF1PR6IphY5nerbfOYbP2/WvlsqskjxEkEzF9lNOQHEShypk 5vR/spGbzjvh599dLs27OShig7fbVGBYztIEUwWlXXWo3gSSVwGpZHbaSzxluMiB8PAJ NvYTSIQMqxD5c+WuDS8GmfX5wyh8iNIAwkcysFfqE0msjWhMHA5SzVaVrobJQK6XcCn+ DiFi0+9h2dWpeGx6h7js3sZ3tOujaFw/ai7R/Wkz1XczMus7PFbshPFDkofG4vfr7/v2 m86g== X-Gm-Message-State: AOJu0YzfBpqm8kxzFR3/KjWoBzJVgeJFXj8gk3WEFizQdHIrc+FToB11 piwnmnF25v9bf1/s3dtfohfoz4/g9fynSxvFYMl1c+BxNyFJIQfA X-Gm-Gg: ASbGnctq9NcHpxpUGlnp+ObcDan46I6MlFtVedAiU6llvdz5PiXt88NO0kPD9LltNU9 9xxzRnVN/luP6/IHaxhu5DrOJ6HVCdFGZY/s55wSBtfwGO9xfb2SXUKMNZTEi9j868qYaQHn8W6 NUKn4Pz/PCfUsDBZjH7BwV4zJBleBVNM3oZ+L3Kj9A+6eCKantKBK2k3C00z9Twbkys2DcH6X9X lOrrvUQqF73QjGy5Pe8t9b0QtBHZrpVv/TV0y3lrK986cGWPao62zE= X-Google-Smtp-Source: AGHT+IHqPfIdmYcdw8pe2VhcrDdfoH+NWGA+AVHo3A957bYsENG03yRQdT7jDGM+J819Rb05jpvhNw== X-Received: by 2002:a17:902:d2c5:b0:215:a60d:bcc9 with SMTP id d9443c01a7336-2177839586fmr124949875ad.2.1734023708719; Thu, 12 Dec 2024 09:15:08 -0800 (PST) Received: from rd-t460 ([2402:d000:8120:2a48:1313:6926:6fa7:7ecb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215f8ef9dafsm122740605ad.120.2024.12.12.09.15.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Dec 2024 09:15:08 -0800 (PST) From: Rehan Deen To: emacs-orgmode@gnu.org, Max Nikulin Subject: Re: [BUG] Org-protocol bookmarklets in Firefox behaving badly after recent upgrade [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)] References: <87pllx7219.fsf@gmail.com> <9aea6ebe-66a2-47d6-a7cc-a7ad9e8af284@gmail.com> <875xnp6qin.fsf@gmail.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 12 Dec 2024 22:45:04 +0530 Message-ID: <87wmg46cx3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=rehan.deen@gmail.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -2.40 X-Spam-Score: -2.40 X-Migadu-Queue-Id: 55FDF40E9E X-TUID: pl8F7hbRwiOt -------------------- Start of forwarded message -------------------- From: Rehan Deen To: Max Nikulin Subject: Re: [BUG] Org-protocol bookmarklets in Firefox behaving badly after recent upgrade [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)] > Try to add "(void)" > javascript:(void)location.href='org-protocol:...> Thanks. I don't know much JavaScript so I didn't think to look at something like that. I tried it as you've described, but it does not work at all -- i.e. nothing is even captured. I've also tried: javascript:(void);location.href='org-protocol:...> javascript:void;location.href='org-protocol:...> javascript:(void 0)location.href='org-protocol:...> javascript:void (0)location.href='org-protocol:...> javascript:"void 0"location.href='org-protocol:...> None of which worked at all either. The following variations do capture the link: javascript:(void 0);location.href='org-protocol:...> javascript:void 0;location.href='org-protocol:...> javascript:"void 0";location.href='org-protocol:...> javascript:void (0);location.href='org-protocol:...> but they all still display the problem of the browser switching to a near blank page with the Org-protocol link. However, I find that the following both seem to work: javascript:location.href='org-protocol://store-link?'+new URLSearchParams({url:location.href,title:document.title}); location.event.preventDefault(); and javascript:location.href='org-protocol://store-link?'+new URLSearchParams({url:location.href,title:document.title}); location.class("hoveronly"); (As found in https://stackoverflow.com/questions/3498492/javascriptvoid0-vs-return-false-vs-preventdefault and https://stackoverflow.com/questions/61265408/href-javascriptvoid0-v-s-href-onclick-return-false?noredirect=1&lq=1) There's probably a cleaner way to "disable the link on click" that someone who is more experienced in JS than me can say. > However bookmarklets are unsafe, you have to allow *web page* to > launch a handler. In the case of an extension this permission may be > given to the extension (but sprig/org-capture-extension still use the > unsafe way). Thanks for the warning. I am not sure how to implement this safely, though perhaps this should be an issue raised in the Worg documentation, e.g. in https://orgmode.org/worg/org-contrib/org-protocol.html -------------------- End of forwarded message --------------------