git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] gitweb: Don't append ';js=(0|1)' to external links

From
Jakub Narębski <jnareb@gmail.com>
Date
Apr 9, 2013, 17:59 UTC
Message-ID
<516456E9.9070309@gmail.com>
In-Reply-To
<m2mwt7a8tz.fsf@zahir.fritz.box>
W dniu 09.04.2013 19:54, Jürgen Kreileder napisał:
Show 14 quoted lines
> Jakub Narębski <jnareb@gmail.com> writes:
> 
>> Jürgen Kreileder wrote:
>>
>>> Don't add js parameters to links outside of gitweb itself.
>>
>> Hmmm... this limits adding ';js=(0|1)' to only links which begin with
>> $my_url, i.e. absolute links beginning with gitweb's base URL.
>>
>> Wouldn't that mean that most internal gitweb-generated links wouldn't
>> get ';js=(0|1)'?  href(..., -full => 1) is not the default...
> 
> No, link.href is always absolute in JavaScript - even if the emitted URL
> was relative.
Thanks, I didn't know that.
So, with that explanation:
Acked-by: Jakub Narebski <jnareb@gmail.com>
Show 6 quoted lines
> Old: https://git.blackdown.de/old.cgi?p=contactalbum.git;a=summary;js=1
> New: https://git.blackdown.de/?p=contactalbum.git;a=summary;js=1
> 
> With the old version the external links in the description got ';js=1'
> appended.  With the new version, ';js=1' isn't on those links.
> Other links are the same in both versions.

Thanks. This is a nice solution for a problem which I didn't know how to solve (I was thinking about using <a class="internal" ...>, but your solution is better).

-- 
Jakub Narębski
Previous: Jürgen Kreileder
Message 4 of 4 in “gitweb: Don't append ';js=(0|1)' to external links”
  1. 3/4 gitweb: Don't append ';js=(0|1)' to external linksJürgen Kreileder, Apr 8, 2013
  2. Jakub NarębskiApr 9, 2013
  3. Jürgen KreilederApr 9, 2013
  4. Jakub NarębskiApr 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.