Permalink
Browse files

Updated line endings

  • Loading branch information...
1 parent ccd7567 commit 4d11bafee40e19503f728f8e0c50984a750bab8a @paullewis paullewis committed Aug 22, 2012
@@ -1,11 +1,11 @@
-chrome.app.runtime.onLaunched.addListener(function() {
- chrome.app.window.create("frameless_window.html",
- { frame: "none", width: 360,
- height: 300,
- minWidth: 220,
- minHeight: 220,
- left: 600
- }
- );
-});
-
+chrome.app.runtime.onLaunched.addListener(function() {
+ chrome.app.window.create("frameless_window.html",
+ { frame: "none", width: 360,
+ height: 300,
+ minWidth: 220,
+ minHeight: 220,
+ left: 600
+ }
+ );
+});
+
@@ -1,37 +1,37 @@
-<html>
-
-<head>
-
-<title>Frameless Window</title>
-
-<link rel="stylesheet" type="text/css" href="style.css" />
-<script src="titlebar.js"></script>
-<script src="frameless_window.js"></script>
-
-</head>
-
-<body>
-
-<div id="content">
-
-<div id="inner-content">
-
-Select the titlebar to enable:<br/>
-<input type="checkbox" id="top-box">Top Titlebar
-<br/>
-<input type="checkbox" id="bottom-box">Bottom Titlebar
-<br/>
-<input type="checkbox" id="left-box">Left Titlebar
-<br/>
-<input type="checkbox" id="right-box">Right Titlebar
-<br/>
-<br/>
-<button id="close-window-button">Close Window</button>
-
-</div>
-
-</div>
-
-</body>
-
-</html>
+<html>
+
+<head>
+
+<title>Frameless Window</title>
+
+<link rel="stylesheet" type="text/css" href="style.css" />
+<script src="titlebar.js"></script>
+<script src="frameless_window.js"></script>
+
+</head>
+
+<body>
+
+<div id="content">
+
+<div id="inner-content">
+
+Select the titlebar to enable:<br/>
+<input type="checkbox" id="top-box">Top Titlebar
+<br/>
+<input type="checkbox" id="bottom-box">Bottom Titlebar
+<br/>
+<input type="checkbox" id="left-box">Left Titlebar
+<br/>
+<input type="checkbox" id="right-box">Right Titlebar
+<br/>
+<br/>
+<button id="close-window-button">Close Window</button>
+
+</div>
+
+</div>
+
+</body>
+
+</html>
@@ -1,61 +1,61 @@
-function updateCheckbox() {
- var top_checkbox = document.getElementById("top-box");
- var bottom_checkbox = document.getElementById("bottom-box");
- var left_checkbox = document.getElementById("left-box");
- var right_checkbox = document.getElementById("right-box");
- if (top_checkbox.checked || bottom_checkbox.checked) {
- left_checkbox.disabled = true;
- right_checkbox.disabled = true;
- } else if (left_checkbox.checked || right_checkbox.checked) {
- top_checkbox.disabled = true;
- bottom_checkbox.disabled = true;
- } else {
- left_checkbox.disabled = false;
- right_checkbox.disabled = false;
- top_checkbox.disabled = false;
- bottom_checkbox.disabled = false;
- }
-}
-
-function initCheckbox(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text) {
- var elem = document.getElementById(checkboxId);
- if (!elem)
- return;
- elem.onclick = function() {
- if (document.getElementById(checkboxId).checked)
- addTitlebar(titlebar_name, titlebar_icon_url, titlebar_text);
- else
- removeTitlebar(titlebar_name);
- focusTitlebars(true);
-
- updateContentStyle();
- updateCheckbox();
- }
-}
-
-window.onfocus = function() {
- console.log("focus");
- focusTitlebars(true);
-}
-
-window.onblur = function() {
- console.log("blur");
- focusTitlebars(false);
-}
-
-window.onresize = function() {
- updateContentStyle();
-}
-
-window.onload = function() {
- initCheckbox("top-box", "top-titlebar", "top-titlebar.png", "Top Titlebar");
- initCheckbox("bottom-box", "bottom-titlebar", "bottom-titlebar.png", "Bottom Titlebar");
- initCheckbox("left-box", "left-titlebar", "left-titlebar.png", "Left Titlebar");
- initCheckbox("right-box", "right-titlebar", "right-titlebar.png", "Right Titlebar");
-
- document.getElementById("close-window-button").onclick = function() {
- window.close();
- }
-
- updateContentStyle();
-}
+function updateCheckbox() {
+ var top_checkbox = document.getElementById("top-box");
+ var bottom_checkbox = document.getElementById("bottom-box");
+ var left_checkbox = document.getElementById("left-box");
+ var right_checkbox = document.getElementById("right-box");
+ if (top_checkbox.checked || bottom_checkbox.checked) {
+ left_checkbox.disabled = true;
+ right_checkbox.disabled = true;
+ } else if (left_checkbox.checked || right_checkbox.checked) {
+ top_checkbox.disabled = true;
+ bottom_checkbox.disabled = true;
+ } else {
+ left_checkbox.disabled = false;
+ right_checkbox.disabled = false;
+ top_checkbox.disabled = false;
+ bottom_checkbox.disabled = false;
+ }
+}
+
+function initCheckbox(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text) {
+ var elem = document.getElementById(checkboxId);
+ if (!elem)
+ return;
+ elem.onclick = function() {
+ if (document.getElementById(checkboxId).checked)
+ addTitlebar(titlebar_name, titlebar_icon_url, titlebar_text);
+ else
+ removeTitlebar(titlebar_name);
+ focusTitlebars(true);
+
+ updateContentStyle();
+ updateCheckbox();
+ }
+}
+
+window.onfocus = function() {
+ console.log("focus");
+ focusTitlebars(true);
+}
+
+window.onblur = function() {
+ console.log("blur");
+ focusTitlebars(false);
+}
+
+window.onresize = function() {
+ updateContentStyle();
+}
+
+window.onload = function() {
+ initCheckbox("top-box", "top-titlebar", "top-titlebar.png", "Top Titlebar");
+ initCheckbox("bottom-box", "bottom-titlebar", "bottom-titlebar.png", "Bottom Titlebar");
+ initCheckbox("left-box", "left-titlebar", "left-titlebar.png", "Left Titlebar");
+ initCheckbox("right-box", "right-titlebar", "right-titlebar.png", "Right Titlebar");
+
+ document.getElementById("close-window-button").onclick = function() {
+ window.close();
+ }
+
+ updateContentStyle();
+}
@@ -1,13 +1,13 @@
-{
- "name": "Frameless Window",
- "description": "Chrome platform app.",
- "manifest_version": 2,
- "version": "0.1",
- "app": {
- "background": {
- "scripts": ["background.js"]
- }
- },
- "permissions": ["experimental"],
- "icons": { "128": "icon_128.png" }
-}
+{
+ "name": "Frameless Window",
+ "description": "Chrome platform app.",
+ "manifest_version": 2,
+ "version": "0.1",
+ "app": {
+ "background": {
+ "scripts": ["background.js"]
+ }
+ },
+ "permissions": ["experimental"],
+ "icons": { "128": "icon_128.png" }
+}
Oops, something went wrong.

0 comments on commit 4d11baf

Please sign in to comment.