Last active
March 15, 2017 19:38
-
-
Save almino/31a2812709849413ed899133b6c02b0c to your computer and use it in GitHub Desktop.
Tampermonkey Browser-sync
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 Browser-sync append script | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Insert a script tag on a document | |
// @author Almino Melo <[email protected]> | |
// @match http://localhost:3000/* | |
// @match http://200.129.37.8:3000/* | |
// @require https://code.jquery.com/jquery-3.1.1.min.js | |
// @grant none | |
// ==/UserScript== | |
$(document).ready(function() { | |
'use strict'; | |
var src = "http://HOST:PORT/browser-sync/browser-sync-client.js?v=2.18.6".replace("HOST", location.hostname).replace("PORT", location.port); | |
jQuery.getScript(src, function() { $(document.body).append(this); }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment