mirror of https://github.com/Phantop/dotfiles
Compare commits
2 Commits
b640b74f93
...
72677e6cf9
Author | SHA1 | Date |
---|---|---|
Phantop | 72677e6cf9 | |
Phantop | d829ca2456 |
|
@ -17,9 +17,10 @@ require "paq" {
|
|||
{ 'nvim-treesitter/nvim-treesitter', run = function() vim.cmd 'TSUpdate' end };
|
||||
|
||||
}
|
||||
require("nnn").setup()
|
||||
require("gitsigns").setup()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
require("ibl").setup()
|
||||
require("nnn").setup()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
highlight = { enable = true, additional_vim_regex_highlighting = false }
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// ==UserScript==
|
||||
// @name EnclosureExpand
|
||||
// @include https://minifocs.fly.dev/*
|
||||
// ==/UserScript==
|
||||
const details = document.querySelector("details.entry-enclosures");
|
||||
details.setAttribute("open", "");
|
|
@ -0,0 +1,35 @@
|
|||
// ==UserScript==
|
||||
// @name PlainText
|
||||
// @description Makes links in plain text one-click to open
|
||||
// @include *.txt
|
||||
// @include *.xml
|
||||
// ==/UserScript==
|
||||
const rss = document.querySelector('rss');
|
||||
|
||||
if (rss) {
|
||||
for (const link of document.querySelectorAll('link')) {
|
||||
link.addEventListener('click', function() { window.open(this.textContent); });
|
||||
link.style = 'text-decorator: underline;';
|
||||
}
|
||||
}
|
||||
else {
|
||||
const text = document.body.innerText;
|
||||
|
||||
const regexpLinks = /http[s]?:\/\/[^;, \n\t]*/
|
||||
const regexpLinksAll = /http[s]?:\/\/[^;, \n\t]*/g
|
||||
const links = [...text.matchAll(regexpLinksAll)]
|
||||
const pieces = text.split(regexpLinks)
|
||||
const combined = pieces.reduce((acc, text, index) => { acc.push(text); links[index] && acc.push(links[index]); return acc; }, [])
|
||||
|
||||
const newText = '<pre>' +
|
||||
combined
|
||||
.map((piece) => {
|
||||
if (!regexpLinks.test(piece)) {
|
||||
return piece;
|
||||
}
|
||||
return `<a target="_blank" href="${piece}">${piece}</a>`;
|
||||
})
|
||||
.join('')
|
||||
+ '</pre>';
|
||||
document.body.innerHTML = newText;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
cope gradescope.com/auth/saml/rpi
|
||||
discord canary.discord.com/app
|
||||
edn designlab.eng.rpi.edu
|
||||
edn designlab.eng.rpi.edu/edn/projects/mvp-pharm-deserts/wiki
|
||||
lms lms.rpi.edu/ultra/stream
|
||||
outlook outlook.office.com/mail
|
||||
submitty submitty.cs.rpi.edu
|
||||
|
|
Loading…
Reference in New Issue