liuyuqi 5 years ago
parent
commit
253fbde362

+ 26 - 0
Extension/_locales/en/messages.json

@@ -0,0 +1,26 @@
+{
+   "extensionName": {
+      "description": "Important: Please substitute the word 'English' for the language (e.g. Deutsch/Francais/etc) you are translating this into.",
+      "message": "EDGE FULLSCREEN"
+   },
+   "userLanguage": {
+      "description": "Important: Please substitute the word 'English' for the language (e.g. Deutsch/Francais/etc) you are translating this into.",
+      "message": "Simple Chinese"
+   },
+  "extensionDescription": {
+    "message": "Edge Full Screen Plugin",
+    "description": "Description of the add-on."
+  },
+  "Version":{
+   "message": "Version",
+    "description": ""
+  },
+  "Start":{
+   "message": "Start",
+    "description": ""
+  },
+  "Stop":{
+   "message": "Stop",
+    "description": ""
+  }
+}

+ 26 - 0
Extension/_locales/zh_CN/messages.json

@@ -0,0 +1,26 @@
+{
+   "extensionName": {
+      "description": "Important: Please substitute the word 'English' for the language (e.g. Deutsch/Francais/etc) you are translating this into.",
+      "message": "EDGE FULLSCREEN"
+   },
+   "userLanguage": {
+      "description": "Important: Please substitute the word 'English' for the language (e.g. Deutsch/Francais/etc) you are translating this into.",
+      "message": "简体中文"
+   },
+  "extensionDescription": {
+    "message": "Edge全屏插件",
+    "description": "Description of the add-on."
+  },
+  "Version":{
+   "message": "Edge全屏插件",
+    "description": ""
+  },
+  "Start":{
+   "message": "启动",
+    "description": ""
+  },
+  "Stop":{
+   "message": "停止",
+    "description": ""
+  }
+}

+ 5 - 1
Extension/css/styles.css

@@ -11,5 +11,9 @@ h1 {
 p {
     font-weight: 500;
     font-size: .8em;
-    margin-bottom: 10px;  
+    margin-bottom: 5px;  
+}
+.div_action{
+	width: 100px;
+	margin-top: 5px;
 }

BIN
Extension/images/color-changer25.png


BIN
Extension/images/color-changer48.png


+ 3 - 13
Extension/js/background.js

@@ -1,13 +1,3 @@
-// function onError(error) {
-//   console.log(`Error: ${error}`);
-// }
-
-// browser.windows.getAll().then((windowInfoArray) => {
-//     for (currentWindow of windowInfoArray) {
-//         browser.windows.update(currentWindow.id, {state: "fullscreen"});
-//     }
-// }, onError);
-
-browser.windows.update(browser.windows.WINDOW_ID_CURRENT,{state:"fullscreen"});
-
-console.log("test!!!!");
+if(!browser.windows.update(browser.windows.WINDOW_ID_CURRENT,{state:"fullscreen"}))
+	if(!document.documentElement.webkitRequestFullScreen())
+		if(document.documentElement.webkitRequestFullscreen())

+ 0 - 1
Extension/js/popup.js

@@ -1,4 +1,3 @@
-// get the buttons by id
 let start = document.getElementById('btn_start');
 let stop = document.getElementById('btn_stop');
 

+ 7 - 4
Extension/popup.html

@@ -5,10 +5,13 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   </head>
   <body>
-    <h1>Creating a Microsoft Edge Extension</h1>
-    <p>Full Screen</p>
-    <button id="btn_start">Start</button>
-    <button id="btn_stop">Stop</button>
+    <h1>Full Screen</h1>
+    <p>Version: 1.0.0.0</p>
+    <p><a href="https://git.yoqi.me/lyq/fullscreen_edge">项目开源</a></p>
+    <div class="div_action">
+        <button id="btn_start">Start</button>
+        <button id="btn_stop">Stop</button>
+    </div>
     <script src="js/popup.js"></script>
   </body>
 </html>