aboutsummaryrefslogtreecommitdiffstats
path: root/jsaccess/jsa/jsa.js
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-06-18 15:45:50 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2013-06-18 15:45:50 +0200
commita79ab8e2868cd61e96349ec53f25db6f9e1a6636 (patch)
treeceaed5e9f9191c1955ec2fa88e0cb0b0db0cd6cf /jsaccess/jsa/jsa.js
parentjsaccess: rsync fix (diff)
downloadlaurent-tools-a79ab8e2868cd61e96349ec53f25db6f9e1a6636.tar.xz
laurent-tools-a79ab8e2868cd61e96349ec53f25db6f9e1a6636.zip
jsaccess: add banner system
Diffstat (limited to '')
-rw-r--r--jsaccess/jsa/jsa.js36
1 files changed, 35 insertions, 1 deletions
diff --git a/jsaccess/jsa/jsa.js b/jsaccess/jsa/jsa.js
index 259899c..806ed49 100644
--- a/jsaccess/jsa/jsa.js
+++ b/jsaccess/jsa/jsa.js
@@ -24,11 +24,45 @@
/* Called on "body" load */
function jsainit() {
+ /* Focus password field */
$("input:text:visible:first").focus();
+
+ /* Banner text */
+ $.ajax({
+ url: "banner/banner.txt",
+ beforeSend: function ( xhr ) {
+ xhr.overrideMimeType("text/plain");
+ },
+ success: function (data) {
+ $('#header h1').html(data);
+ }
+ });
+ /* Banner image */
+ $.ajax({
+ url: "banner/banner.png",
+ beforeSend: function ( xhr ) {
+ xhr.overrideMimeType("image/png");
+ },
+ success: function (data) {
+ $('#banner img').attr('src', "banner/banner.png");
+ /* Banner image link */
+ $.ajax({
+ url: "banner/banner-png-href.txt",
+ beforeSend: function ( xhr ) {
+ xhr.overrideMimeType("text/plain");
+ },
+ success: function (data) {
+ $('#banner a').attr('href', data);
+ }
+ });
+ },
+ error: function (data) {
+ $('#banner img').remove();
+ }
+ });
}
/* Called on "Get files list" click */
-
function jsagetlist() {
var pass = document.getElementById('password').value;
var RMD160 = new Hashes.RMD160;