Commit 5c0641ae authored by Sven Franck's avatar Sven Franck

added wrapping gadget

parent 5eb28b1c
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../hyperbrowser.js"></script>
<script type="text/javascript" src="../renderjs.js"></script>
<script type="text/javascript" src="filecontent.js"></script>
<style type="text/css">
body > iframe {width: 100%;}
</style>
</head>
<body>
<noscript>
Please enable Javascript
</noscript>
</body>
</html>
\ No newline at end of file
/*global document, jQuery */
// filebrowser.html?file=browser%3A%2F%2Fbrowse%2Fls%2F
// filebrowser_and_preview.html?file=browser%3A%2F%2Fbrowse%2Fls%2F
"use strict";
(function (document, $) {
// contents
localStorage.setItem("foo", "bar");
localStorage.setItem("baz", "bam");
sessionStorage.setItem("cous", "cous");
sessionStorage.setItem("schnick", "schnack");
// var myIndexOf = function (path, contains) {
// var len = path.length;
// var wordLen = contains.length;
// for(var i = 0; i < len; i++) {
// var j = 0;
// for(j = 0; j < wordLen; j++) {
// if(path[i+j] != contains[j]) {
// break;
// }
// }
// if(j == wordLen) {
// return i;
// }
// }
// return -1;
// };
//
// var getParameter = function(searchString, paramName) {
// var i, val, params = searchString.split("&");
//
// for (i=0;i<params.length;i++) {
// val = params[i].split("=");
// if (val[0] == paramName) {
// return decodeURIComponent(val[1]);
// }
// }
// return null;
// };
//
// // this is our "interactor", it only knows one other iFrame
// // so we post to this one!
// var handler = function (event) {
// var frames = document.getElementsByTagName("iframe"), frame, i;
// for (i = 0; i < frames.length; i += 1) {
// frame = frames[i];
// if (myIndexOf(
// event.source.location.pathname,
// frame.getAttribute("src").split("?")[0]
// ) < 0) {
// frame.contentWindow.postMessage(event.data, "*");
// }
// }
// };
//
var mapUrl = function (url) {
// var searchString = url.href.split("?")[1],
// fileToDisplay;
//
// if (searchString) {
// fileToDisplay = getParameter(searchString, "file");
//
// if (fileToDisplay) {
$("body").append(
'<iframe src="' +
// XXX Hardcoded gadget to load
'filebrowser_and_preview.html' + "?file=browser%3A%2F%2Fbrowse%2Fls%2F" +
'">' +
'<p>Your browser does not support iframes.</p>' +
'</iframe">');
$("body").append(
'<iframe src="' +
// XXX Hardcoded gadget to load
'filebrowser_and_preview.html' + "?file=browser%3A%2F%2Fbrowse%2Fss%2F" +
'">' +
'<p>Your browser does not support iframes.</p>' +
'</iframe">');
// } else {
// $("body").text("No parameter found in url");
// }
// } else {
// $("body").text("No parameter found in url (2)");
// }
};
$(document).ready(function () {
mapUrl(window.location);
// if (window.addEventListener){
// window.addEventListener("message", handler, false)
// } else {
// window.attachEvent("onmessage", handler)
// }
});
}(document, jQuery));
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