Permalink
Browse files

removing github userscripts for now

These are just problematic, and let's face it, I can make changes much
more effectively now.
  • Loading branch information...
1 parent de80fb2 commit c681e838145389fefcdb609636f8b15a166f2697 @ymendel committed Mar 15, 2013
Showing with 0 additions and 60 deletions.
  1. +0 −14 gist.github.com.js
  2. +0 −46 github.com.js
View
14 gist.github.com.js
@@ -1,14 +0,0 @@
-function imageTagForString(str) {
- label = str.substr(1, str.length - 2);
- return "<img alt='" + str + "' title='" + str +
- "' src='https://github.com/flogic/emogc/raw/master/images/" + label + ".png' />";
-}
-
-$('*').replaceText(/:([a-z]\w*):(?!:)/gi, imageTagForString);
-
-
-$("div.actions").prepend("<a href='#' id='soft-wrap'>wrap it</a>")
-$("a#soft-wrap").click(function(event) {
- $("div.highlight pre").css("width", "590px").css("white-space", "pre-wrap")
- event.preventDefault()
-})
View
46 github.com.js
@@ -1,46 +0,0 @@
-function imageTagForString(str) {
- label = str.substr(1, str.length - 2);
- return "<img alt='" + str + "' title='" + str +
- "' src='https://github.com/flogic/emogc/raw/master/images/" + label + ".png' />";
-}
-
-if (!window.location.href.match('/raw/')) {
- $('*').replaceText(/:([a-z]\w*):(?!:)/gi, imageTagForString);
-}
-
-
-$("div.file ul.actions").prepend("<li><a href='https://gist.github.com/gists' id='gist-url'>gist it</a></li>")
-
-function buildGistForm() {
- $("body").append("\
- <div id='hiddenGistForm'> \
- <form action='https://gist.github.com/gists' method='post'> \
- <input type='text' name='file_name[gistfile1]' /> \
- <input type='text' name='file_ext[gistfile1]' /> \
- <textarea name='file_contents[gistfile1]'></textarea> \
- <button type='submit' name='action_button' value='private'>Create Private Gist</button> \
- </form> \
- </div> \
- ")
- $("div#hiddenGistForm").hide()
-}
-
-function submitGistForm() {
- $('button[name=action_button]').click()
-}
-function setGistFormValues() {
- rawURL = $("ul.actions a#raw-url").attr("href")
- filename = rawURL.split("/").pop()
- $("form input[name='file_name[gistfile1]']").attr('value', filename)
- $.get(rawURL, function(data) {
- $("form textarea[name='file_contents[gistfile1]']").attr('innerHTML', data)
- submitGistForm()
- }
- )
-}
-
-$("a#gist-url").click(function(event) {
- event.preventDefault()
- buildGistForm()
- setGistFormValues()
-})

0 comments on commit c681e83

Please sign in to comment.