Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

userscript for chrome #1

Merged
merged 1 commit into from

2 participants

@kidd

Inserts
script type="text/javascript" src="http://localhost:9090/bdo"
on localhost pages automatically.

Btw, Good extension dude!

@chrisdone
Owner

Oh… Nice idea! I like that!

@chrisdone chrisdone merged commit 73e9ca5 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 26, 2012
  1. @kidd
This page is out of date. Refresh to see the latest.
Showing with 19 additions and 1 deletion.
  1. +3 −1 README.md
  2. +16 −0 contrib/bdo.user.js
View
4 README.md
@@ -34,6 +34,9 @@ Then add the following in your web page:
<script type="text/javascript" src="http://localhost:9090/bdo"></script>
+You can use a browser userscript to make your browser insert that line on the
+fly, on some webs. See contrib/bdo.user.js.
+
The script depdends on jQuery. If that's a problem, you can hack
around it and give me a patch.
@@ -56,4 +59,3 @@ bdo-refresh`.
If you change your mind, you can run `M-x bdo-set-client` or
`M-x bdo-set-link` to set the client or link element referred to.
-
View
16 contrib/bdo.user.js
@@ -0,0 +1,16 @@
+// ==UserScript==
+// @name Live BDO reloader
+// @description Include tag to load js from local bdb server
+// @author Raimon Grau Cuscó <raimonster@gmail.com>
+// @include http://localhost*
+// @version 0.1
+// @license LGPL http://www.gnu.org/licenses/lgpl.html
+// ==/UserScript==
+
+var head = document.getElementsByTagName('head').item(0);
+var tag = document.createElement('script');
+
+tag.setAttribute('src','http://localhost:9090/bdo');
+tag.setAttribute('type','text/javascript');
+
+head.appendChild(tag);
Something went wrong with that request. Please try again.