Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script for Tampermonkey that adds 'view' to the actions menu beside 'row', 'blame' and 'history' buttons and allow you to preview rendered .html pages.
// ==UserScript==
// @name Github html preview
// @author
// @version 1.0
// @description Shortcut for
// @match**/*.html
// @grant none
// @require
// ==/UserScript==
$(document).ready(function() {
var viewBtn = $('<a>')
.attr('href', '' + window.location.href)
.attr('class', 'btn btn-sm BtnGroup-item')
.html('Html preview');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment