Skip to content

Commit

Permalink
Update dependencies, output modern code (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jul 31, 2023
1 parent a34106b commit 806243e
Show file tree
Hide file tree
Showing 5 changed files with 2,226 additions and 1,650 deletions.
2 changes: 1 addition & 1 deletion demo/Detections.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{:else}
<pre><code>
{#each urls as url}
<a href="/?url={encodeURIComponent(url)}">{url}</a><br>
<a href="./?url={encodeURIComponent(url)}">{url}</a><br>
{/each}
</code></pre>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ addTests('isNewRepoTemplate', [
const getUsername = (): string | undefined => $('meta[name="user-login"]')?.getAttribute('content')!;

/** Drop all duplicate slashes */
const getCleanPathname = (url: URL | HTMLAnchorElement | Location = location): string => url.pathname.replace(/\/+/g, '/').slice(1, url.pathname.endsWith('/') ? -1 : undefined);
const getCleanPathname = (url: URL | HTMLAnchorElement | Location = location): string => url.pathname.replaceAll(/\/+/g, '/').slice(1, url.pathname.endsWith('/') ? -1 : undefined);

const getCleanGistPathname = (url: URL | HTMLAnchorElement | Location = location): string | undefined => {
const pathname = getCleanPathname(url);
Expand Down

0 comments on commit 806243e

Please sign in to comment.