Skip to content

Commit

Permalink
Merge remote branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
qistoph committed Apr 27, 2013
2 parents 8c4e198 + 5ac12c2 commit 45c169b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 12 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<!doctype html/>
<!doctype html>
<html>
<head>
<title>WiFi QR-code - Javascript</title>

<!-- Facebook Meta Tags -->
<meta property="og:url" content="http://qistoph.github.io/WiFiQR/" />
<meta property="og:title" content="WiFi QR-code" />
<meta property="og:description" content="Share your WiFi easily with a QR-code" />
<meta property="og:image" content="http://qistoph.github.io/WiFiQR/example.png" />

<!-- Reference scripts and theme stylesheet on the Google CDN -->
<!-- use //ajax... for online web to automatically switch between http and https -->
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/ui-lightness/jquery-ui.css"
Expand Down Expand Up @@ -285,7 +291,7 @@
window.printQR = function(targetWin) {
var printWin = window.open('', '_blank', '');

printWin.document.write('<!doctype html/><html><head><title>WiFi: ' + $("#S").val() + '</title></head><body>');
printWin.document.write('<!doc'+'type html><ht'+'ml><he'+'ad><title>WiFi: ' + $("#S").val() + '</title></he'+'ad><bo'+'dy>');
printWin.document.write('<div id="card">');
printWin.document.write('<div id="cardcontent">');
printWin.document.write('<div id="qrcode"></div>');
Expand All @@ -295,15 +301,16 @@
printWin.document.write('<div id="about">Generate your WiFi QR at<br/>http://qistoph.github.io/WiFiQR</div>');
printWin.document.write('</div>');
printWin.document.write('</div>');
printWin.document.write('</body></html>');
printWin.document.write('</bo'+'dy></ht'+'ml>');

$("style[target='card']").each(function() {
$(printWin.document.head).append($(this).clone())
});

generateQR($("#qrcode", printWin.document), $("#qrtitle", printWin.document));
printWin.print();
//printWin.close();
$(printWin.document).ready(function() {
printWin.print();
});
}
</script>
</head>
Expand Down

0 comments on commit 45c169b

Please sign in to comment.