Last active
December 15, 2015 01:09
-
-
Save Nevon/5178042 to your computer and use it in GitHub Desktop.
This was by request. I swear.
This file contains 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
/* Yeah... So... I don't want to know what you do with this. */ | |
;(function ( $, window, document, undefined ) { | |
// Create the defaults once | |
var pluginName = "getWood", | |
defaults = { | |
length: 20 | |
}; | |
// The actual plugin constructor | |
function Plugin( element, options ) { | |
this.element = element; | |
this.options = $.extend( {}, defaults, options ); | |
this._defaults = defaults; | |
this._name = pluginName; | |
this.init(); | |
} | |
Plugin.prototype = { | |
init: function() { | |
$(this.element).append('<pre>'+this.getWood(this.element, this.options)+'</pre>'); | |
}, | |
getWood: function(el, options) { | |
var lines = this.repeat(this.options.length, '_'); | |
var spaces = this.repeat(this.options.length, ' '); | |
var penis = | |
' _______'+lines+',--.__\n'+ | |
' ,--"" '+spaces+'\'\\ \'\\\n'+ | |
' / " '+spaces+' \\ \'\\\n'+ | |
',/ '+spaces+' \'\\ |\n'+ | |
'| " " " '+spaces+' \'\\, /\n'+ | |
'| " , ='+lines+'______,--"\n'+ | |
'| " " /"/\'\n'+ | |
'\\ " ",/ /\n'+ | |
' \\ ",",_/,-\'\n'+ | |
' \'-;.__:-\''; | |
return penis; | |
}, | |
repeat: function(num, character) { | |
return new Array( num + 1 ).join( character ); | |
} | |
}; | |
$.fn[pluginName] = function ( options ) { | |
return this.each(function () { | |
if (!$.data(this, "plugin_" + pluginName)) { | |
$.data(this, "plugin_" + pluginName, new Plugin( this, options )); | |
} | |
}); | |
}; | |
})( jQuery, window, document ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment