目的
- 為HKEPC的用家提供不同的主題,豐富用家體驗
- 整個結構以方便其它HTML,CSS & Javascript Developer 開發新主題為中心設計,可以更專注設計主題
概覽
整個核心部份將會讀取以下三個File
/content/theme/theme.json
/content/font/font.json
/content/addons/addons.json
所以JSON 𥚃的 Setting 將會直接反映到 Option page.
Getting start
Install the Extension
- Chrome -> setting -> More Tools -> Extension
- Tick Developer mode on top-right hand side
- Download Zip from github
- Unzip it
- Click "Load unpacked extension" select the folder
You will see HKECP Plus will load and then click "Options" to enter the control panel
Make your first theme
- Make a new folder(e.g MyFirstTheme) in /content/theme/
- Create your CSS/Javascript injections in your folder
e.g create a javacript file /content/theme/MyFirstTheme/testInject.js
$(function(){
alert("This javascript file is running");
});
3. Edit /content/theme/theme.json
add your theme details in the json
{
...
"MyFirstTheme":{
"name":"My first theme for HKEPC",
"css":[],
"js":["testInject.js"],
"addons":[]
}
}
4. Refresh your chrome HKEPC Plus option page, you should able to see your new theme.
5. Refresh your HKEPC web page in chrome! You should able to see a alert dialog.
Add addons to your theme
{
...
"MyFirstTheme":{
"name":"My first theme for HKEPC",
"css":[],
"js":["testInject.js"],
"addons":["THE_ADDONS_FOLDER_NAME"]
}
}
Load External Plugin
Use absolute path to indicate the plugin location
{
...
"MyFirstTheme":{
"name":"My first theme for HKEPC",
"css":["/plugins/bootstrap/css/bootstrap.min.css"],
"js":["testInject.js"],
"addons":["THE_ADDONS_FOLDER_NAME"]
}
}
Make your font
All steps are very similar to "Make your first theme"
Make your addons
All steps are very similar to "Make your first theme"
Screenshot Preview
Road map
- Create a HKEPC Plus Center for sharing and upload your own theme
- Notification on HKECP notification & private message
- Desktop App for surfing HKEPC
---Real time chating with HKECP desktop App user
License
Copyright (c) [2015] [LO YUE HEI]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.