This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| if (location.host.includes('bootstrap.hexschool')) | |
| url = `https://getbootstrap.com${location.pathname.replace('4.2', '4.6')}`; | |
| else if (location.host.includes('bootstrap5.hexschool')) | |
| url = `https://getbootstrap.com${location.pathname.replace('5.0', '5.0')}`; | |
| else if (location.host.includes('getbootstrap')) { | |
| if (location.pathname.includes('5.0')) { | |
| url = `https://bootstrap5.hexschool.com${location.pathname.replace('5.0', '5.0')}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "", | |
| "autoConvert": "trad", | |
| "iconAction": "trad", | |
| "symConvert": false, | |
| "inputConvert": "none", | |
| "fontCustom": { | |
| "enable": false, | |
| "trad": "微軟正黑體, PMingLiU, MingLiU, 新細明體, 細明體", | |
| "simp": "MS Song, 宋体, SimSun" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| const sidebar = document.querySelector('.sidebar'); | |
| const page = document.querySelector('.page'); | |
| const main = document.querySelector('main'); | |
| if (!sidebar.style.display) { | |
| sidebar.style.display = 'none'; | |
| if (location.host === 'next.router.vuejs.org') { | |
| page.style.margin = '0'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const weekList = { '一': 0, '二': 1, '三': 2, '四': 3, '五': 4, '六': 5, '日': 6 }; | |
| const result = document.querySelector('[role="region"] .fontBodyMedium > [role="button"] + [aria-label]') | |
| .getAttribute('aria-label') | |
| .replace('. 隱藏本週營業時間', '') | |
| .split('; ') | |
| .map(item => { | |
| const [fullWeek, ...openHours] = item.split('、'); | |
| return { | |
| week: fullWeek[2], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async () => { | |
| async function appendScript(url) { | |
| return new Promise(resolve => { | |
| const script = document.createElement('script'); | |
| script.setAttribute('src', url); | |
| script.addEventListener("load", resolve); | |
| document.body.appendChild(script); | |
| }); | |
| } | |
| async function loadPlugin(pluginName) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const inlineCodePattern = /(\w+\.)*\w+\(\)/g; | |
| function formatParagraph(paragraph) { | |
| const lines = paragraph.split('\n'); | |
| return formatLines(lines); | |
| } | |
| function formatLines(lines) { | |
| const result = lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| if (location.hostname === 'github.com') { | |
| const [_, username, repo] = location.pathname.split('/'); | |
| location.href = `https://${username}.github.io/${repo}`; | |
| return; | |
| } | |
| if (location.hostname.includes('github.io')) { | |
| const username = location.host.split('.')[0]; | |
| const repo = location.pathname.split('/')[1]; | |
| location.href = `https://github.com/${username}/${repo}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const title = document.querySelector('[data-testid=context-item-info-title]').textContent; | |
| const [...artists] = document.querySelectorAll('[data-testid=context-item-info-artist]'); | |
| const artistList = artists.map(artist => artist.textContent).join(' & '); | |
| const textArea = document.createElement('textarea'); | |
| textArea.value = `${artistList} - ${title}`; | |
| document.body.appendChild(textArea); | |
| textArea.select(); | |
| document.execCommand('Copy'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| const sidebar = document.querySelector('#sidebar'); | |
| sidebar.style.display = !sidebar.style.display ? 'none' : null; | |
| })() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const vedioId = location.pathname.split('/').at(-1); | |
| location.href = `${location.origin}/watch?v=${vedioId}`; | |
| })(); |