Skip to content
This repository was archived by the owner on Apr 25, 2022. It is now read-only.

Commit 5a0d8c3

Browse files
committed
license & Firefox
1 parent 94986cf commit 5a0d8c3

File tree

3 files changed

+46
-39
lines changed

3 files changed

+46
-39
lines changed

LICENSE

+17-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
BSD 3-Clause License
1+
MIT License
22

3-
Copyright (c) 2018, CodFrm
4-
All rights reserved.
3+
Copyright (c) [year] [fullname]
54

6-
Redistribution and use in source and binary forms, with or without
7-
modification, are permitted provided that the following conditions are met:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
811

9-
* Redistributions of source code must retain the above copyright notice, this
10-
list of conditions and the following disclaimer.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1114

12-
* Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
15-
16-
* Neither the name of the copyright holder nor the names of its
17-
contributors may be used to endorse or promote products derived from
18-
this software without specific prior written permission.
19-
20-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build/cxmooc-tools/manifest.json

+28-13
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,37 @@
88
"48": "img/logo.png",
99
"128": "img/logo.png"
1010
},
11+
"applications": {
12+
"gecko": {
13+
14+
"strict_min_version": "42.0"
15+
}
16+
},
1117
"browser_action": {
1218
"default_icon": "img/logo.png",
1319
"default_title": "超星慕课小工具",
1420
"default_popup": "src/popup.html"
1521
},
1622
"background": {
17-
"scripts": ["src/background.js"]
23+
"scripts": [
24+
"src/background.js"
25+
]
1826
},
19-
"content_scripts": [{
20-
"matches": [
21-
"*://*/mycourse/studentstudy?*",
22-
"*://*/work/doHomeWorkNew?*",
23-
"*://*/work/selectWorkQuestionYiPiYue?*",
24-
"*://*/exam/test/reVersionTestStartNew?*",
25-
"*://*/ztnodedetailcontroller/visitnodedetail?*"
26-
],
27-
"js": ["src/start.js"],
28-
"run_at": "document_start"
29-
}],
27+
"content_scripts": [
28+
{
29+
"matches": [
30+
"*://*/mycourse/studentstudy?*",
31+
"*://*/work/doHomeWorkNew?*",
32+
"*://*/work/selectWorkQuestionYiPiYue?*",
33+
"*://*/exam/test/reVersionTestStartNew?*",
34+
"*://*/ztnodedetailcontroller/visitnodedetail?*"
35+
],
36+
"js": [
37+
"src/start.js"
38+
],
39+
"run_at": "document_start"
40+
}
41+
],
3042
"permissions": [
3143
"contextMenus",
3244
"tabs",
@@ -37,6 +49,9 @@
3749
"declarativeContent",
3850
"https://*/"
3951
],
40-
"web_accessible_resources": ["src/mooc.js", "src/action.js"],
52+
"web_accessible_resources": [
53+
"src/mooc.js",
54+
"src/action.js"
55+
],
4156
"homepage_url": "https://blog.icodef.com"
4257
}

src/cxmooc-tools/start.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ window.onload = function () {
2323
//设置一下配置
2424
localStorage['rand-answer'] = items.rand_answer;
2525
localStorage['config'] = JSON.stringify(items);
26+
common.injected(document, chrome.extension.getURL('src/mooc.js'));
2627
});
27-
common.injected(document, chrome.extension.getURL('src/mooc.js'));
2828
})
2929
}

0 commit comments

Comments
 (0)