Skip to content

Commit

Permalink
remove redundant code && ntr
Browse files Browse the repository at this point in the history
  • Loading branch information
taroxd committed Dec 22, 2015
1 parent 7c0d81a commit 0fdc347
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
8 changes: 1 addition & 7 deletions env-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ window.remote = require('remote');

window.ROOT = remote.getGlobal('ROOT');

window.APPDATA_PATH = remote.getGlobal('APPDATA_PATH');

window.POI_VERSION = remote.getGlobal('POI_VERSION');

window.SERVER_HOSTNAME = remote.getGlobal('SERVER_HOSTNAME');

window.MODULE_PATH = remote.getGlobal('MODULE_PATH');

require('module').globalPaths.push(MODULE_PATH);

require(ROOT + "/components/coffee-script/extras/coffee-script.js");
require('coffee-react/register');
6 changes: 2 additions & 4 deletions index.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ i18n = new (require 'i18n-2')
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: path.join(__dirname, 'i18n')
updateFiles: false
indent: '\t'
extension: '.json'
devMode: false

Expand All @@ -33,8 +31,8 @@ module.exports =
name: 'ItemInfo'
priority: 51
displayName: <span><FontAwesome name='rocket' key={0} />{' ' + __('Equipment Info')}</span>
author: 'Yunze'
link: 'https://github.com/myzwillmake'
author: 'taroxd'
link: 'https://github.com/taroxd'
version: '1.6.5'
description: __ 'Show detailed information of all owned equipment'
handleClick: ->
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<body>
<item-info />
<script>
require('coffee-react/register');
require('./item-info');
</script>
</body>
Expand Down
14 changes: 1 addition & 13 deletions item-info.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ i18n = new (require 'i18n-2')
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: path.join(__dirname, 'i18n')
updateFiles: false
indent: '\t'
extension: '.json'
devMode: false

Expand All @@ -19,16 +17,6 @@ try

document.title = __ 'Equipment Info'

window.theme = config.get 'poi.theme', '__default__'
if theme == '__default__'
$('#bootstrap-css')?.setAttribute 'href', "file://#{ROOT}/components/bootstrap/dist/css/bootstrap.css"
else
$('#bootstrap-css')?.setAttribute 'href', "file://#{ROOT}/assets/themes/#{theme}/css/#{theme}.css"
window.addEventListener 'theme.change', (e) ->
window.theme = e.detail.theme
if theme == '__default__'
$('#bootstrap-css')?.setAttribute 'href', "file://#{ROOT}/components/bootstrap/dist/css/bootstrap.css"
else
$('#bootstrap-css')?.setAttribute 'href', "file://#{ROOT}/assets/themes/#{theme}/css/#{theme}.css"
loadTheme config.get('poi.theme', '__default__')

require './views'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"type": "git",
"url": "https://github.com/poooi/plugin-item-info.git"
},
"author": "Yunze",
"contributors": ["taroxd"],
"author": "taroxd",
"contributors": ["Yunze"],
"license": "MIT",
"bugs": {
"url": "https://github.com/poooi/plugin-item-info/issues"
Expand Down

0 comments on commit 0fdc347

Please sign in to comment.