Commit 29626b08 authored by Robert Speicher's avatar Robert Speicher

Remove unused `showAndHide`, `simpleFormat`, and `linkify` functions

Also removes redundant `unbind` call
parent 39d5a487
...@@ -49,8 +49,6 @@ window.slugify = (text) -> ...@@ -49,8 +49,6 @@ window.slugify = (text) ->
window.ajaxGet = (url) -> window.ajaxGet = (url) ->
$.ajax({type: "GET", url: url, dataType: "script"}) $.ajax({type: "GET", url: url, dataType: "script"})
window.showAndHide = (selector) ->
window.split = (val) -> window.split = (val) ->
return val.split( /,\s*/ ) return val.split( /,\s*/ )
...@@ -92,15 +90,7 @@ window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) -> ...@@ -92,15 +90,7 @@ window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) ->
window.sanitize = (str) -> window.sanitize = (str) ->
return str.replace(/<(?:.|\n)*?>/gm, '') return str.replace(/<(?:.|\n)*?>/gm, '')
window.linkify = (str) ->
exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
return str.replace(exp,"<a href='$1'>$1</a>")
window.simpleFormat = (str) ->
linkify(sanitize(str).replace(/\n/g, '<br />'))
window.unbindEvents = -> window.unbindEvents = ->
$(document).unbind('scroll')
$(document).off('scroll') $(document).off('scroll')
window.shiftWindow = -> window.shiftWindow = ->
......
$.fn.showAndHide = ->
$(@).show().
delay(3000).
fadeOut()
# Disable an element and add the 'disabled' Bootstrap class # Disable an element and add the 'disabled' Bootstrap class
$.fn.extend disable: -> $.fn.extend disable: ->
$(@) $(@)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment