Created
August 31, 2026 22:01
-
-
Save bucketss/881fb8f74bf4dec66a8c24afe0dd6d0f to your computer and use it in GitHub Desktop.
EQL <-> P99 wiki xlinker (tampermonkey)
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
| // ==UserScript== | |
| // @name p99 x eql wiki linker | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description links the wikis | |
| // @author you | |
| // @match *://wiki.project1999.com/* | |
| // @match *://eqlwiki.com/* | |
| // @match *://www.eqlwiki.com/* | |
| // @grant none | |
| // @run-at document-end | |
| // ==/UserScript== | |
| (function () { | |
| 'use strict'; | |
| const OPEN_IN_NEW_TAB = true; | |
| const SITES = { | |
| 'wiki.project1999.com': { | |
| otherBase: 'https://eqlwiki.com', | |
| label: 'View on EQLWiki', | |
| corner: { bottom: '56px', right: '20px' }, | |
| }, | |
| 'eqlwiki.com': { | |
| otherBase: 'https://wiki.project1999.com', | |
| label: 'View on P99 Wiki', | |
| corner: { bottom: '56px', right: '20px' }, | |
| }, | |
| 'www.eqlwiki.com': { | |
| otherBase: 'https://wiki.project1999.com', | |
| label: 'View on P99 Wiki', | |
| corner: { bottom: '56px', right: '20px' }, | |
| }, | |
| }; | |
| const site = SITES[location.hostname]; | |
| if (!site || document.getElementById('p99-eqlwiki-crosslink')) return; | |
| const targetUrl = site.otherBase + location.pathname + location.search; | |
| const link = document.createElement('a'); | |
| link.id = 'p99-eqlwiki-crosslink'; | |
| link.href = targetUrl; | |
| link.textContent = site.label + ' \u2192'; | |
| link.title = 'Open the matching page on the other wiki'; | |
| if (OPEN_IN_NEW_TAB) { | |
| link.target = '_blank'; | |
| link.rel = 'noopener noreferrer'; | |
| } | |
| Object.assign(link.style, { | |
| position: 'fixed', | |
| top: site.corner.top || 'auto', | |
| bottom: site.corner.bottom || 'auto', | |
| left: site.corner.left || 'auto', | |
| right: site.corner.right || 'auto', | |
| zIndex: 2147483647, | |
| background: '#1b1b1b', | |
| color: '#ffffff', | |
| padding: '10px 16px', | |
| borderRadius: '999px', | |
| fontFamily: 'Arial, Helvetica, sans-serif', | |
| fontSize: '13px', | |
| fontWeight: 'bold', | |
| textDecoration: 'none', | |
| boxShadow: '0 2px 10px rgba(0,0,0,0.35)', | |
| opacity: '0.88', | |
| whiteSpace: 'nowrap', | |
| lineHeight: '1', | |
| transition: 'opacity 0.15s ease, transform 0.15s ease', | |
| }); | |
| link.addEventListener('mouseenter', () => { | |
| link.style.opacity = '1'; | |
| link.style.transform = 'translateY(-2px)'; | |
| }); | |
| link.addEventListener('mouseleave', () => { | |
| link.style.opacity = '0.88'; | |
| link.style.transform = 'translateY(0)'; | |
| }); | |
| document.body.appendChild(link); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment