This file contains hidden or 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
var validatePrice = /((\d+\.|\.)[0-9]{1,2})|\d+/; | |
if (!validatePrice.test($('#marketPrice').val())) { | |
alert_error('your price must be a numeric value'); | |
return false; | |
} |
This file contains hidden or 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
// handle the facebook api watch functions for the youtube player | |
// removes the posted watch if it does not meet the requirements | |
var ytPlayerInterval, ytplayer; | |
function handleAPIWatch(){ | |
try { | |
($('#modal_content object embed')[0]) ? ytplayer = $('#modal_content object embed')[0] : ytplayer = ""; | |
var time = ytplayer.getCurrentTime(); | |
if(ytplayer.getCurrentTime() >= (ytplayer.getDuration() / 2)) { | |
// console.log("out after 50"); | |
if (fbstart) { |
This file contains hidden or 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
// parse a string input or text body for # | |
// | |
function parseHashTags(words) { | |
var str_array = words.split(" "); | |
var pattern = /^\#/gi; | |
// the specific str_array element being processed | |
var part = ""; | |
// rebuilt string of original title with hyperlinked words |
This file contains hidden or 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
String.prototype.format = function () { | |
var re = /\{\d+\}/g, args = arguments; | |
return this.replace(re, function (x) {return args[x.match(/\d+/)]; }); | |
}; | |
// Number.toRad method | |
if (typeof(Number.prototype.toRad) === "undefined") { | |
Number.prototype.toRad = function() { | |
return this * Math.PI / 180; | |
} |
This file contains hidden or 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
function getYoutubeKey(linkText) { | |
// var linkText = $('#modal #vidEmbedKey').val(); | |
var reYoutubeKey = /^[a-zA-Z0-9\-]{11}$/; | |
if (reYoutubeKey.test(linkText)) { | |
return linkText; | |
} | |
var reYoutubeUrl = /http\:\/\/www\.youtube\.com\/watch\?v=([\w-]{11})/; | |
var httpsreYoutubeUrl = /https\:\/\/www\.youtube\.com\/watch\?v=([\w-]{11})/; |
NewerOlder