Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
holazz committed May 12, 2022
1 parent 3807f5a commit 4c91aec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ async function createElement(config) {
const refNode = document.querySelector('#repo-content-pjax-container a.btn.d-none.d-md-block[data-hotkey="t"]')
if (!refNode) return

const { title, icon, type, hotKey, newTab } = config
const { title, icon, type, hotkey, newTab } = config
const classList = refNode.classList.contains('ml-2') ? 'btn ml-2' : 'btn mr-2'
const url = window.location.href.replace('https://github.com/', 'https://github1s.com/')
const el = `
<a id="gh1s-btn" class="${classList}" href="${url}" target="${newTab ? '_blank' : '_self'}" data-hotkey="${hotKey}">
<a id="gh1s-btn" class="${classList}" href="${url}" target="${newTab ? '_blank' : '_self'}" data-hotkey="${hotkey}">
${type === 'text' ? title : icon}
</a>
`
Expand Down

0 comments on commit 4c91aec

Please sign in to comment.