Skip to content

Instantly share code, notes, and snippets.

@jasonseney
jasonseney / reddit_only_google.js
Created July 12, 2022 17:55
Reddit Search on Google
window.location.href = encodeURI(document.location.href) + '&as_sitesearch=reddit.com';
@jasonseney
jasonseney / pageless-gdoc.css
Created June 27, 2022 16:14
Hides page break lines in Google Docs
/* Hide page breaks in google docs */
.kix-page-compact::before {
border-top: 0px !important;
}
@jasonseney
jasonseney / amazon_bad.js
Last active July 12, 2022 17:57
Excluse Amazon in Google search results (not specific to any amazon domain)
window.location.href = encodeURI(document.location.href) + '&as_eq=amazon';
@jasonseney
jasonseney / viewOnDash.js
Last active January 8, 2021 20:52
View Tumblr Post on the Dashboard
var blog = window.location.hostname.match(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]+)\./)[1];
var postId = window.location.pathname.match(/\/(\d+)\/?/)[1];
window.location.href = `https://www.tumblr.com/blog/view/${blog}/${postId}`;
@jasonseney
jasonseney / send-to-whatsapp.js
Created July 21, 2020 02:14
Send Link to Whatsapp
window.location.href = 'https://wa.me?text=' + encodeURI(document.location.href);
@jasonseney
jasonseney / show-page-snippet.js
Last active May 20, 2021 01:39
Displays a dialog showing the page title, description, and URL.
var metaDescription = document.querySelector('meta[name="description"]') || document.querySelector('meta[property="og:description"]');
var summary = [
document.title,
metaDescription ? metaDescription['content'] : '',
document.location.href
].join('\n\n');
alert(summary);
@jasonseney
jasonseney / jiraLink.js
Last active June 23, 2020 16:44
Creates a URL using the document title in a format for inserting into a JIRA ticket.
@jasonseney
jasonseney / markdownLink.js
Last active May 23, 2019 20:58
Markdown Link For the Current Page
var copyToClipboard = function(str) {
var el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style.position = 'absolute';
el.style.left = '-9999px';
document.body.appendChild(el);
document.getSelection().removeAllRanges();
el.select();
document.execCommand('copy');