From e6e24d392288496c895003e7e9518674dea915cb Mon Sep 17 00:00:00 2001 From: Pepper Date: Thu, 26 Feb 2015 18:47:40 -0500 Subject: ok done! --- htmljs/imbreak_main.js | 113 +++++++++ htmljs/imgradient_index.html | 539 +++++++++++++++++++++++++++++++++++++++++++ htmljs/imgrid_main.js | 121 ++++++++++ 3 files changed, 773 insertions(+) create mode 100644 htmljs/imbreak_main.js create mode 100644 htmljs/imgradient_index.html create mode 100644 htmljs/imgrid_main.js (limited to 'htmljs') diff --git a/htmljs/imbreak_main.js b/htmljs/imbreak_main.js new file mode 100644 index 0000000..c56c9a2 --- /dev/null +++ b/htmljs/imbreak_main.js @@ -0,0 +1,113 @@ +var Main = + { + firsttime: true, + generating: false, + thelast: "", + enter: function (e) + { + if (Main.generating) + return + if (e.keyCode === 13) + Main.go() + }, + go: function () + { + if (Main.generating) + return + Main.generating = true + var theloader = '' + $("#output-cmd").html(theloader).show() + $('.result').show() + $('.results').show() + $("#output-img").show() + $("#output-url").show() + $("#result").show() + var data = + { + breakmode:$('input:radio[name=modeswitch]:checked').val(), + breaktype: $('#breaktype :selected').val(), + breakangle: $("#breakangle").val(), + url: $('#url').val(), + username: $('#username').val(), + firsttime: Main.firsttime.toString() + } + if (data["breakmode"] == "gradual") + { + data["breakmode"] = "subtle" + if (Main.lines && Main.thelast == $('#url').val()) + { + Main.firsttime = false + data["url"] = Main.lines[1] + } + } + else + { + Main.firsttime = true + } + Main.thelast = $('#url').val(); + thestring = JSON.stringify(data); + $('#error').append(thestring); + if (data.username.length > 0) + document.cookie = "imname="+data.username+";path=/;domain=.asdf.us;max-age=1086400" + $.post("/im/api/imbreak", data, Main.callback) + }, + error: function (s) + { + $("#output-cmd").html("ERROR: " + s + "").show() + $("#output-url").hide() + $("#output-img").hide() + }, + filesize: function (size) + { + if (size < 1024) + return size.toString() + " bytes" + if (size < 1024 * 1024) + return Math.floor (size/1024).toString() + " KB" + else + return Math.floor (size/(1024*1024)).toString() + " MB" + }, + callback: function (data) + { + data = JSON.parse(data) + $('#error').append('called'); + $("#output-cmd").html('') + $('#output-url').val(data.url) + $("#output-img").html("click image to enlarge
"+"
"+"
" +); + $("#output-info").html('-ACTUAL SIZE-
'+Main.filesize(data.size)+'
'+data.width+'
'+data.height+'

'+'see more at →photoblaster gallery'+'
') + Main.generating = false + }, + cookie: function () + { + if (document.cookie) + { + var cookies = document.cookie.split(";") + for (i in cookies) + { + var cookie = cookies[i].split("=") + if (cookie[0].indexOf("imname") !== -1) + { + if (cookie[1] !== 'false' && cookie[1] !== 'undefined' && cookie[1].length) + { + return cookie[1] + } + } + } + } + return "" + }, + init: function () + { + var name = Main.cookie () + $("#username").val(name) + $("#breakbutton").bind("click", Main.go) + $(document).bind("keydown", Main.enter) + } + } +//$('#theform').each(function(){ +// this.reset(); +// }); + + + +Main.init () diff --git a/htmljs/imgradient_index.html b/htmljs/imgradient_index.html new file mode 100644 index 0000000..275bfec --- /dev/null +++ b/htmljs/imgradient_index.html @@ -0,0 +1,539 @@ + + + + + + +GRADIENT PHOTOBLASTER + + + + + + + + + + + + +
+
+
+

+ GRADIENT GENERATOR FOR PHOTOBLASTER + + + + + + + + +

+ + + + + + + + + + + px +
+ + + + + px +
+ + + + + list of color names + + + + + +
+ + + + + +
+ + + + + + + if yes...0-4000-2000 + + + + + + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + + + % + + + + + + +
+ + + +
+ + ° +
+ + + + ° +
+ + + + + + + + + + + + +
+ + + + + + + +
+ VIEW AND ARRANGE THE PHOTOBLASTS → Image Gallery
+ + OPEN THE PHOTOBLASTER EDITOR → PHOTOBLASTER + + TOP PHOTOBLASTS GO TO THE TUMBLR → Photoblaster Tumblr +

+ +
+ +
+ →
+
+ + +
+ + + +
+
+
+ + + + + + + + diff --git a/htmljs/imgrid_main.js b/htmljs/imgrid_main.js new file mode 100644 index 0000000..f88e235 --- /dev/null +++ b/htmljs/imgrid_main.js @@ -0,0 +1,121 @@ +var Main = + { + API_HEADER: "#@imgrid", + generating: false, + enter: function (e) + { + if (Main.generating) + return + if (e.keyCode === 13) + Main.go() + }, + go: function () + { + if (Main.generating) + return + Main.generating = true + var theloader = '' + $("#output-cmd").html(theloader).show() + if($('#transition :selected').val() === 'tile'||$('#transition :selected').val()=== 'random') + { + $('#output-cmd').append("
WARNING: THIS REQUEST MIGHT TAKE A WHILE") + } + $('.results').show() + $("#output-img").show() + $("#output-url").show() + $("#result").show() + var data = + { + width: $("#img-width").val(), + height: $("#img-height").val(), + linethickness: $("#line-thickness").val(), + opacity: $("#line-opacity").val(), + linecolor: $("#line-color").val(), + spacing: $("#line-spacing").val(), + vlines: $('#v-lines:checked').val() !== undefined ? "true" : "false", + hlines: $('#h-lines:checked').val() !== undefined ? "true" : "false", + shadow: $('#shadow:checked').val() !== undefined ? "true" : "false", + bgimage: $("#bg-image").val(), + bgcolor: $("#bg-color").val(), + imageinstead: $("#imageinstead").val(), + planebgcolor: $("#planebgcolor").val(), + skycolor: $("#skycolor").val(), + planebgimage: $("#planebgimage").val(), + transition: $('#transition :selected').val(), + swing: $("#swing").val(), + tilt: $("#tilt").val(), + roll: $("#roll").val(), + zoom: $("#zoom").val(), + trim: $("#trim:checked").val() !== undefined ? "true" : "false", + format: $('#format :selected').val(), + username: $('#username').val() + } + if (data.transition == 'infinite'){ + $('#genbutton').append("WARNING:This might take a while")} + if (data.username.length > 0) + document.cookie = "imname="+data.username+";path=/;domain=.asdf.us;max-age=1086400" + $.post("/im/api/imgrid", data, Main.callback) + }, + error: function (s) + { + $("#output-cmd").html("ERROR: " + s + "").show() + $("#output-url").hide() + $("#output-img").hide() + }, + filesize: function (size) + { + if (size < 1024) + return size.toString() + " bytes" + if (size < 1024 * 1024) + return Math.floor (size/1024).toString() + " KB" + else + return Math.floor (size/(1024*1024)).toString() + " MB" + }, + callback: function (data) + { + data = JSON.parse(data) + $("#output-cmd").html('') + $("#output-img").html(""+"
"+"
"); + $("#output-url").val(data.url) + $("#output-info").html('-ACTUAL SIZE-
'+Main.filesize(data.size)+'
'+data.width+'
'+data.height+'

'+'see more at →photoblaster gallery'+'
') + Main.generating = false + }, + cookie: function () + { + if (document.cookie) + { + var cookies = document.cookie.split(";") + for (i in cookies) + { + var cookie = cookies[i].split("=") + if (cookie[0].indexOf("imname") !== -1) + { + if (cookie[1] !== 'false' && cookie[1] !== 'undefined' && cookie[1].length) + { + return cookie[1] + } + } + } + } + return "" + }, + init: function () + { + var name = Main.cookie () + $("#username").val(name) + if (name) + { +// $("#userlink").show() + // $("#userlink a").attr("href", "/im/gallery/?name="+name).html(name+"'s photoblasts") + } + $("#generate").bind("click", Main.go) + $(document).bind("keydown", Main.enter) + } + } +$('#theform').each(function(){ + this.reset(); + }); + + + +Main.init () -- cgit v1.2.3-70-g09d2