changeset 382:8ceb373e32d8

Nuke out javascripts =] Will bring some back later.
author nanaya <me@myconan.net>
date Sun, 07 Jun 2015 02:56:01 +0900
parents bfc5ad3f7dc5
children af27800e9a0d
files app/assets/javascripts/application.coffee app/assets/javascripts/autosize_box_fix.coffee app/assets/javascripts/boot.coffee app/assets/javascripts/config/highlight.coffee app/assets/javascripts/config/markdown.coffee app/assets/javascripts/config/marked.coffee app/assets/javascripts/config/prettify.coffee app/assets/javascripts/new_paste.coffee app/assets/javascripts/zp.clean_notice.coffee app/assets/javascripts/zp.formatter.coffee app/assets/javascripts/zp.hash_magic.coffee app/assets/javascripts/zp.init.coffee app/assets/javascripts/zp.new.coffee
diffstat 12 files changed, 6 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/javascripts/application.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ b/app/assets/javascripts/application.coffee	Sun Jun 07 02:56:01 2015 +0900
@@ -1,3 +1,4 @@
 #= require jquery
 #= require jquery_ujs
-#= require boot
+
+#= require new_paste
--- a/app/assets/javascripts/autosize_box_fix.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-$.autosize_box_fix = (elem) ->
-  elem.css 'box-sizing', ''
-  elem.css '-webkit-box-sizing', ''
-  elem.css '-moz-box-sizing', ''
--- a/app/assets/javascripts/config/highlight.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-#= require highlightjs
--- a/app/assets/javascripts/config/markdown.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-#= require markdown
--- a/app/assets/javascripts/config/marked.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-#= require marked
-marked.setOptions
-  gfm: true
-  pedantic: true
-  sanitize: true
--- a/app/assets/javascripts/config/prettify.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-#= require prettify
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/assets/javascripts/new_paste.coffee	Sun Jun 07 02:56:01 2015 +0900
@@ -0,0 +1,4 @@
+$(document).click "#reset_paste", (e) ->
+  e.preventDefault()
+  $form = $("#paste_paste")
+  $form.val("").focus()
--- a/app/assets/javascripts/zp.clean_notice.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-window.zp.cleanNotice =
-  init: ->
-    if (history.replaceState)
-      queryString = "?#{window.location.search.slice(1).replace(/(^|&)notice=[^&]*(&?)/, "$2")}"
-      newPath = window.location.pathname
-      newPath += queryString if queryString != "?"
-      newPath += window.location.hash
-      history.replaceState null, "", newPath
--- a/app/assets/javascripts/zp.formatter.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#= require config/marked
-#= require config/prettify
-window.zp.formatter =
-  raw: -> $("#pl pre").text()
-  links: -> $("#paste-mode a")
-  current: -> $("#paste-mode .active a").attr("href").slice(1)
-  markdown: ->
-    $("#md div")
-      .html(marked @raw())
-      .find("pre").addClass "prettyprint"
-      .end()
-      .find("a").prop "rel", "nofollow"
-  highlight: ->
-    $("#hl pre").text @raw()
-    prettyPrint()
-  init: ->
-    @markdown()
-    @highlight()
--- a/app/assets/javascripts/zp.hash_magic.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#= require zp.formatter
-window.zp.hash_magic =
-  load_hash: ->
-    format = window.location.hash.slice(1)
-    tab_link = (fmt) -> zp.formatter.links().filter("[href='##{fmt}']")
-
-    format = "pl" unless tab_link(format).length
-    tab_link(format).click()
-
-  set_hash: (e) ->
-    format = zp.formatter.current()
-    newpath = window.location.pathname
-    newpath += "##{format}" if (format != "pl")
-    history.replaceState null, "", newpath
-
-  init: ->
-    return unless $("#paste").length
-    @load_hash()
-    if (history.replaceState)
-      @set_hash()
-      zp.formatter.links().on("shown.bs.tab", this.set_hash)
--- a/app/assets/javascripts/zp.init.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-window.zp = {}
--- a/app/assets/javascripts/zp.new.coffee	Sun Jun 07 02:51:58 2015 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#= require jquery.autosize
-#= require autosize_box_fix
-window.zp.new =
-  input: -> $("#paste_paste")
-
-  clear: (e) ->
-    e.preventDefault()
-    @input().val("").focus()
-
-  init: ->
-    return unless @input().length
-
-    $(document).on "click", "#reset_paste", $.proxy(@clear, this)
-    @input().autosize className: "mirrored_text form-control", append: "\n"
-    $.autosize_box_fix $(".mirrored_text")
-    @input().focus()