Skip to content

Commit 50cbf03

Browse files
authored
Merge pull request #1420 from hackmdio/feature/upgrade-reveal.js-3.9.2
Feature/upgrade reveal.js 3.9.2
2 parents e33bafd + 98fa323 commit 50cbf03

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

lib/csp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function addInlineScriptExceptions (directives) {
7171
directives.scriptSrc.push(getCspNonce)
7272
// TODO: This is the SHA-256 hash of the inline script in build/reveal.js/plugins/notes/notes.html
7373
// Any more clean solution appreciated.
74-
directives.scriptSrc.push('\'sha256-Lc+VnBdinzYTTAkFrIoUqdoA9EQFeS1AF9ybmF+LLfM=\'')
74+
directives.scriptSrc.push('\'sha256-81acLZNZISnyGYZrSuoYhpzwDTTxi7vC1YM4uNxqWaM=\'')
7575
}
7676

7777
function getCspNonce (req, res) {

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"raphael": "~2.2.8",
129129
"readline-sync": "~1.4.7",
130130
"request": "~2.88.0",
131-
"reveal.js": "~3.7.0",
131+
"reveal.js": "~3.9.2",
132132
"scrypt": "~6.0.3",
133133
"select2": "~3.5.2-browserify",
134134
"sequelize": "5.21.3",

public/docs/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ stop
348348
> More information about **sequence diagrams** syntax [here](http://bramp.github.io/js-sequence-diagrams/).
349349
> More information about **flow charts** syntax [here](http://adrai.github.io/flowchart.js/).
350350
> More information about **graphviz** syntax [here](http://www.tonyballantyne.com/graphs.html)
351-
> More information about **mermaid** syntax [here](http://knsv.github.io/mermaid)
351+
> More information about **mermaid** syntax [here](http://mermaid-js.github.io/mermaid)
352352
> More information about **abc** syntax [here](http://abcnotation.com/learn)
353353
> More information about **plantuml** syntax [here](http://plantuml.com/index)
354354
> More information about **vega** syntax [here](https://vega.github.io/vega-lite/docs)

public/views/slide.ejs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<% if(useCDN) { %>
1919
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.7/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous" />
2020
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
21-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/reveal.min.css" integrity="sha256-9+Wg2bcNeiOMGXOUNqBdceY2lAH/eCiTDcdzHhHIl48=" crossorigin="anonymous" />
21+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js@3.9.2/css/reveal.min.css" integrity="sha256-h2NhWerL2k7KAzo6YqYMo1T5B6+QT2Bb/CprRV2aW20=" crossorigin="anonymous" />
2222
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/[email protected]/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
2323
<%- include build/slide-header %>
2424
<%- include shared/polyfill %>
@@ -88,8 +88,7 @@
8888

8989
<script src="<%= serverURL %>/js/mathjax-config-extra.js"></script>
9090
<% if(useCDN) { %>
91-
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/lib/js/head.min.js" integrity="sha256-CTcwyen1cxIrm4hlqdxe0y7Hq6B0rpxAKLiXMD3dJv0=" crossorigin="anonymous"></script>
92-
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/js/reveal.min.js" integrity="sha256-Xr6ZH+/kc7hDVReZLO5khBknteLqu5oen/xnSraXrVk=" crossorigin="anonymous"></script>
91+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/reveal.min.js" integrity="sha256-1fq1NvUmkMIWOBgIEzGFr0UUNuwWmOa29YqMkXnYlH4=" crossorigin="anonymous"></script>
9392
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
9493
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.5.2/velocity.min.js" integrity="sha256-1HqoI76JGKA17K0C0s9K8L/iy8PAC43KVLt1hRD/Ojc=" crossorigin="anonymous" defer></script>
9594
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" integrity="sha256-jnOjDTXIPqall8M0MyTSt98JetJuZ7Yu+1Jm7hLTF7U=" crossorigin="anonymous" defer></script>

test/csp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ describe('Content security policies', function () {
4949
csp = mock.reRequire('../lib/csp')
5050

5151
assert(!csp.computeDirectives().scriptSrc.includes('https://cdnjs.cloudflare.com'))
52+
assert(!csp.computeDirectives().scriptSrc.includes('https://cdn.jsdelivr.net'))
5253
assert(!csp.computeDirectives().scriptSrc.includes('https://cdn.mathjax.org'))
5354
assert(!csp.computeDirectives().styleSrc.includes('https://cdnjs.cloudflare.com'))
55+
assert(!csp.computeDirectives().styleSrc.includes('https://cdn.jsdelivr.net'))
5456
assert(!csp.computeDirectives().styleSrc.includes('https://fonts.googleapis.com'))
5557
assert(!csp.computeDirectives().fontSrc.includes('https://cdnjs.cloudflare.com'))
5658
assert(!csp.computeDirectives().fontSrc.includes('https://fonts.gstatic.com'))
@@ -119,6 +121,6 @@ describe('Content security policies', function () {
119121
it('Unchanged hash for reveal.js speaker notes plugin', function () {
120122
const hash = crypto.createHash('sha1')
121123
hash.update(fs.readFileSync(path.resolve(__dirname, '../node_modules/reveal.js/plugin/notes/notes.html'), 'utf8'), 'utf8')
122-
assert.strictEqual(hash.digest('hex'), '471f3826880fac884a4a14faabc492bc854ae994')
124+
assert.strictEqual(hash.digest('hex'), 'd5d872ae49b5db27f638b152e6e528837204d380')
123125
})
124126
})

webpack.common.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ module.exports = {
364364
'script-loader!vega',
365365
'script-loader!vega-lite',
366366
'script-loader!vega-embed',
367-
'headjs',
368367
'expose-loader?Reveal!reveal.js',
369368
'expose-loader?RevealMarkdown!reveal-markdown',
370369
path.join(__dirname, 'public/js/slide.js')
@@ -391,7 +390,6 @@ module.exports = {
391390
'jquery-ui-resizable': path.join(__dirname, 'public/vendor/jquery-ui/jquery-ui.min.js'),
392391
'gist-embed': path.join(__dirname, 'node_modules/gist-embed/gist-embed.min.js'),
393392
'bootstrap-tooltip': path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.js'),
394-
'headjs': path.join(__dirname, 'node_modules/reveal.js/lib/js/head.min.js'),
395393
'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js'),
396394
abcjs: path.join(__dirname, 'public/vendor/abcjs_basic_3.1.1-min.js'),
397395
raphael: path.join(__dirname, 'node_modules/raphael/raphael.min.js'),

0 commit comments

Comments
 (0)