Skip to content

Commit

Permalink
Merge pull request #409 from ikemo3/fix/javascript-error
Browse files Browse the repository at this point in the history
fix: remove 'javascript:void(0)'
  • Loading branch information
ikemo3 authored Aug 15, 2022
2 parents f960787 + edcdc5a commit ef8762c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ export const $ = {
anchor(text?: string): HTMLAnchorElement {
const anchor = document.createElement("a");
// eslint-disable-next-line no-script-url
anchor.setAttribute("href", "javascript:void(0)"); // change link color.
anchor.removeAttribute("href");
anchor.classList.add("gsb-anchor");

if (text !== undefined) {
anchor.textContent = text;
Expand Down
4 changes: 4 additions & 0 deletions apps/styles/google.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,7 @@ div[role="listitem"] {
margin-left: 0 !important;
white-space: normal !important;
}

.gsb-anchor {
cursor: pointer;
}

0 comments on commit ef8762c

Please sign in to comment.