Moved John's code to the correct place
This commit is contained in:
parent
73f97cc7d5
commit
a717e07531
|
@ -21,13 +21,6 @@ var socket;
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
handshake();
|
handshake();
|
||||||
// This is a temporary location, Peter to move
|
|
||||||
$("#exporthtmla").attr("href", document.location.href + "/export/html");
|
|
||||||
$("#exportplaina").attr("href", document.location.href + "/export/txt");
|
|
||||||
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
|
||||||
$("#exportpdfa").attr("href", document.location.href + "/export/pdf");
|
|
||||||
$("#exportopena").attr("href", document.location.href + "/export/odt");
|
|
||||||
$("#exportwordlea").attr("href", document.location.href + "/export/wordle");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).unload(function()
|
$(window).unload(function()
|
||||||
|
@ -35,18 +28,6 @@ $(window).unload(function()
|
||||||
pad.dispose();
|
pad.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Wordle code, Peter to move
|
|
||||||
function loadCont(){
|
|
||||||
padUrl = location.pathname;
|
|
||||||
padHost = location.host;
|
|
||||||
var padUrl = "http://" + padHost + padUrl + "/export/txt";
|
|
||||||
$.get(padUrl, function(data) {
|
|
||||||
$('.result').html(data);
|
|
||||||
$('#text').html(data);
|
|
||||||
$('#wordlepost').submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createCookie(name, value, days)
|
function createCookie(name, value, days)
|
||||||
{
|
{
|
||||||
if (days)
|
if (days)
|
||||||
|
|
|
@ -230,6 +230,14 @@ var padimpexp = (function()
|
||||||
var self = {
|
var self = {
|
||||||
init: function()
|
init: function()
|
||||||
{
|
{
|
||||||
|
// build the export links
|
||||||
|
$("#exporthtmla").attr("href", document.location.href + "/export/html");
|
||||||
|
$("#exportplaina").attr("href", document.location.href + "/export/txt");
|
||||||
|
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
||||||
|
$("#exportpdfa").attr("href", document.location.href + "/export/pdf");
|
||||||
|
$("#exportopena").attr("href", document.location.href + "/export/odt");
|
||||||
|
$("#exportwordlea").attr("href", document.location.href + "/export/wordle");
|
||||||
|
|
||||||
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
||||||
|
|
||||||
$("#impexp-close").click(function()
|
$("#impexp-close").click(function()
|
||||||
|
@ -264,6 +272,19 @@ var padimpexp = (function()
|
||||||
$("#impexp-disabled-clickcatcher").hide();
|
$("#impexp-disabled-clickcatcher").hide();
|
||||||
$("#import").css('opacity', 1);
|
$("#import").css('opacity', 1);
|
||||||
$("#impexp-export").css('opacity', 1);
|
$("#impexp-export").css('opacity', 1);
|
||||||
|
},
|
||||||
|
export2Wordle: function()
|
||||||
|
{
|
||||||
|
padUrl = location.pathname;
|
||||||
|
padHost = location.host;
|
||||||
|
var padUrl = "http://" + padHost + padUrl + "/export/txt";
|
||||||
|
|
||||||
|
$.get(padUrl, function(data)
|
||||||
|
{
|
||||||
|
$('.result').html(data);
|
||||||
|
$('#text').html(data);
|
||||||
|
$('#wordlepost').submit();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return self;
|
return self;
|
||||||
|
|
|
@ -234,7 +234,7 @@ We removed this feature cause its not worth the space it needs in the editbar
|
||||||
<a id="exportworda" target="_blank" class="exportlink"><div class="exporttype" id="exportword">Microsoft Word</div></a>
|
<a id="exportworda" target="_blank" class="exportlink"><div class="exporttype" id="exportword">Microsoft Word</div></a>
|
||||||
<a id="exportpdfa" target="_blank" class="exportlink"><div class="exporttype" id="exportpdf">PDF</div></a>
|
<a id="exportpdfa" target="_blank" class="exportlink"><div class="exporttype" id="exportpdf">PDF</div></a>
|
||||||
<a id="exportopena" target="_blank" class="exportlink"><div class="exporttype" id="exportopen">OpenDocument</div></a>
|
<a id="exportopena" target="_blank" class="exportlink"><div class="exporttype" id="exportopen">OpenDocument</div></a>
|
||||||
<a id="exportwordlea" target="_blank" onClick="loadCont();return false;" class="exportlink"><div class="exporttype" id="exportwordle">Wordle</div></a>
|
<a id="exportwordlea" target="_blank" onClick="padimpexp.export2Wordle();return false;" class="exportlink"><div class="exporttype" id="exportwordle">Wordle</div></a>
|
||||||
<form id="wordlepost" name="wall" action="http://wordle.net/advanced" method="POST" style="margin-left:0px;">
|
<form id="wordlepost" name="wall" action="http://wordle.net/advanced" method="POST" style="margin-left:0px;">
|
||||||
<div id="hidetext" style=""><textarea id="text" name="text" id="text" style="display:none;">Coming soon!</textarea></div>
|
<div id="hidetext" style=""><textarea id="text" name="text" id="text" style="display:none;">Coming soon!</textarea></div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue