Skip to content

Commit 52135a6

Browse files
authored
Merge branch 'coding-blocks:master' into feature/disable-copy-inspect-shortcuts
2 parents b6b3a7e + cc58c5b commit 52135a6

File tree

4 files changed

+6
-48
lines changed

4 files changed

+6
-48
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
id: yarn-cache-dir-path
1616
run: echo "::set-output name=dir::$(yarn cache dir)"
1717

18-
- uses: actions/cache@v1
18+
- uses: actions/cache@v3
1919
id: yarn-cache
2020
with:
2121
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,4 @@
11
import Component from '@ember/component';
2-
import { inject as service } from '@ember/service';
3-
import { jsonToTable } from '../../../util/json-to-table';
42

53
export default Component.extend({
6-
languageSelection: service('language-selection'),
7-
8-
init() {
9-
this._super(...arguments);
10-
let contest = this.get('contest');
11-
12-
13-
document.addEventListener('contextmenu', function (event) {
14-
event.preventDefault();
15-
});
16-
17-
18-
document.addEventListener('keydown', function (event) {
19-
if (
20-
event.key === 'F12' ||
21-
(event.ctrlKey && event.shiftKey && event.key === 'I') ||
22-
(event.ctrlKey && event.shiftKey && event.key === 'C') ||
23-
(event.ctrlKey && event.shiftKey && event.key === 'J') ||
24-
(event.ctrlKey && event.key === 'U')
25-
) {
26-
event.preventDefault();
27-
}
28-
});
29-
},
30-
31-
jsonToTable(data) {
32-
const table = jsonToTable(data);
33-
return table;
34-
}
354
});

app/pods/components/problem-explanation/template.hbs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<div class="py-4 no-select">
2-
<p>{{markdown-to-html problem.details.description}}</p>
3-
1+
<div class="py-4">
2+
<p>
3+
{{markdown-to-html problem.details.description}}
4+
</p>
45
<div class="extra-bold">Input Format</div>
56
<p>
67
{{markdown-to-html problem.details.input_format}}
@@ -21,11 +22,7 @@
2122
</div>
2223
<div class="extra-bold">Sample Output</div>
2324
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
24-
{{#if (includes contest.allowedLanguages "mysql")}}
25-
<pre>{{json-to-table problem.details.sample_output}}</pre>
26-
{{else}}
27-
<pre>{{problem.details.sample_output}}</pre>
28-
{{/if}}
25+
<pre>{{problem.details.sample_output}}</pre>
2926
</div>
3027
{{#if problem.details.explanation}}
3128
<div class="extra-bold">Explanation</div>

app/styles/app.scss

-8
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,4 @@ body{
292292
100% {
293293
box-shadow: 0 0 0 6px rgba(167, 89, 47, 0.032);
294294
}
295-
}
296-
297-
.no-select {
298-
user-select: none;
299-
-webkit-user-select: none;
300-
-moz-user-select: none;
301-
-ms-user-select: none;
302-
pointer-events: none;
303295
}

0 commit comments

Comments
 (0)