Skip to content

Instantly share code, notes, and snippets.

@prahladyeri
Created June 22, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prahladyeri/e38ba5ff6ea1c71edebd71105713c9d8 to your computer and use it in GitHub Desktop.
Save prahladyeri/e38ba5ff6ea1c71edebd71105713c9d8 to your computer and use it in GitHub Desktop.
Adding the missing "My Posts" and "My Comments" links on top of HackerNews website
// ==UserScript==
// @name HN Addons
// @namespace https://prahladyeri.com
// @version 0.1
// @description Add custom bells and whistles to HN
// @author Prahlad Yeri
// @match https://news.ycombinator.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant none
// ==/UserScript==
var me = $("a#me").text();
$("span.pagetop:first").append("<a class='myaddons' href='https://news.ycombinator.com/submitted?id=" + me + "'>| my posts |</a>");
$("span.pagetop:first").append("<a class='myaddons' href='https://news.ycombinator.com/threads?id=" + me + "'> my cmts |</a>");
$("span.pagetop font").css('display','none');
console.log('Number of font elements: ' + $("span.pagetop font").length);
$("span.pagetop a").css('font-size','12px');
//$("span.pagetop a").css('font-family','segoe ui');
$("span.pagetop a").css('font-family','tahoma');
//$("span.pagetop").css({'background-color':'yellow'});
//console.log('settings done');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment