杨弘 3年前
コミット
6095828f15
13個のファイルの変更2104行の追加0行の削除
  1. +1
    -0
      .github/FUNDING.yml
  2. バイナリ
      .github/screenshot.png
  3. バイナリ
      .github/wallpaper.png
  4. +1
    -0
      CNAME
  5. +46
    -0
      CODE_OF_CONDUCT.md
  6. +21
    -0
      LICENSE
  7. +193
    -0
      css/ide.css
  8. バイナリ
      favicon.ico
  9. バイナリ
      images/judge0_background.png
  10. バイナリ
      images/judge0_icon.png
  11. +303
    -0
      index.html
  12. +1407
    -0
      js/ide.js
  13. +132
    -0
      third_party/download.js

+ 1
- 0
.github/FUNDING.yml ファイルの表示

@ -0,0 +1 @@
patreon: hermanzdosilovic

バイナリ
.github/screenshot.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 255 KiB

バイナリ
.github/wallpaper.png ファイルの表示

変更前 変更後
幅: 1920  |  高さ: 1080  |  サイズ: 403 KiB

+ 1
- 0
CNAME ファイルの表示

@ -0,0 +1 @@
ide.judge0.com

+ 46
- 0
CODE_OF_CONDUCT.md ファイルの表示

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hermanz.dosilovic@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

+ 21
- 0
LICENSE ファイルの表示

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Herman Zvonimir Došilović
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.

+ 193
- 0
css/ide.css ファイルの表示

@ -0,0 +1,193 @@
html, body {
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
}
body {
background: url(/images/judge0_background.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.ui[class*="left action"].input>.dropdown {
border-radius: 0 .28571429rem .28571429rem 0;
}
.ui.selection.dropdown {
width: 205px;
}
.lm_header .lm_tab {
padding-bottom: 3px;
height: 16px;
font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback";
font-size: 14px;
}
.lm_header .lm_tab.lm_active {
box-shadow: none;
padding-bottom: 3px;
}
#site-navigation {
border-radius: 0;
margin: 0;
background: #1e1e1e;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
height: 45px;
}
#navigation-message {
font-size: 1.2em;
white-space: nowrap;
overflow: hidden;
}
@keyframes slide {
0% { transform: translateX(570px); }
100% { transform: translateX(-100%); }
}
@-webkit-keyframes slide {
0% { transform: translateX(570px); }
100% { transform: translateX(-100%); }
}
.navigation-message-text {
white-space: nowrap;
-moz-animation: slide 60s linear infinite;
-webkit-animation: slide 60s linear infinite;
animation: slide 60s linear infinite;
}
.navigation-message-text:hover {
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
#navigation-message a {
color: #41a5f1;
font-weight: bold;
}
#site-icon {
width: 30px;
height: 30px;
vertical-align: middle;
}
#site-header {
padding-left: 0;
padding-top: 0;
padding-bottom: 0;
}
#site-header h2 {
display: inline;
vertical-align: middle;
font-family: 'Exo 2', sans-serif;
}
#site-content {
height: calc(100% - 45px - 19px);
}
#site-modal .header {
color: #db2828;
}
#site-footer, #status-line, #donate-line {
background-color: #0E6EB8;
bottom: 0;
font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback";
font-size: 13px;
height: 19px;
padding-left: 16px;
padding-right: 16px;
position: fixed;
}
#site-footer {
color: #41a5f1;
left: 0;
text-align: center;
width: 100%;
}
#site-footer a {
color: #41a5f1;
font-weight: bold;
}
#site-footer a:hover {
color: #a0d2f8;
}
#donate-line {
float: left;
left: 0;
text-align: left;
width: fit-content;
}
#status-line {
color: #fff;
float: right;
right: 0;
text-align: right;
width: fit-content;
}
#editor-status-line {
background: transparent;
color: #fff;
font-family: monospace;
height: 19px;
padding: 0px 16px;
width: inherit;
}
#editor-status-line input[type=text] {
background: transparent;
border: none;
color: #fff;
font-family: monospace;
outline: none;
}
#editor-status-line input[type=text]::selection {
background-color: #cce2ff;
color: #fff;
}
.blink {
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% {
background: #FFD700;
}
}
.dot {
background: #0E6EB8;
position: absolute;
border-radius: 50px;
width: 5px;
height: 5px;
right: 7.5px;
top: 7.5px;
}
.no-left-padding {
padding-left: 0 !important;
}
input[type="text"] {
width: 205px !important;
}

バイナリ
favicon.ico ファイルの表示

変更前 変更後

バイナリ
images/judge0_background.png ファイルの表示

変更前 変更後
幅: 3840  |  高さ: 2160  |  サイズ: 62 KiB

バイナリ
images/judge0_icon.png ファイルの表示

変更前 変更後
幅: 2480  |  高さ: 2480  |  サイズ: 160 KiB

+ 303
- 0
index.html ファイルの表示

@ -0,0 +1,303 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages.">
<meta name="keywords" content="online editor, online code editor, online ide, online compiler, online interpreter, run code online, learn programming online,
online debugger, programming in browser, online code runner, online code execution, debug online, debug C code online, debug C++ code online,
programming online, snippet, snippets, code snippet, code snippets, pastebin, execute code, programming in browser, run c online, run C++ online,
run java online, run python online, run ruby online, run c# online, run rust online, run pascal online, run basic online">
<meta name="author" content="Herman Zvonimir Došilović">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Judge0 IDE - Free and open-source online code editor">
<meta property="og:description" content="Free and open-source online code editor that allows you to write and execute code from a rich set of languages.">
<meta property="og:image" content="https://raw.githubusercontent.com/judge0/ide/master/.github/wallpaper.png">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/goldenlayout.min.js" integrity="sha256-NhJAZDfGgv4PiB+GVlSrPdh3uc75XXYSM4su8hgTchI=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-base.css" integrity="sha256-oIDR18yKFZtfjCJfDsJYpTBv1S9QmxYopeqw2dO96xM=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/golden-layout/1.5.9/css/goldenlayout-dark-theme.css" integrity="sha256-ygw8PvSDJJUGLf6Q9KIQsYR3mOmiQNlDaxMLDOx9xL0=" crossorigin="anonymous" />
<script>
var require = {
paths: {
"vs": "https://unpkg.com/monaco-editor/min/vs",
"monaco-vim": "https://unpkg.com/monaco-vim/dist/monaco-vim",
"monaco-emacs": "https://unpkg.com/monaco-emacs/dist/monaco-emacs"
}
};
</script>
<script src="https://unpkg.com/monaco-editor/min/vs/loader.js"></script>
<script src="https://unpkg.com/monaco-editor@0.18.1/min/vs/editor/editor.main.nls.js"></script>
<script src="https://unpkg.com/monaco-editor@0.18.1/min/vs/editor/editor.main.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet">
<script type="text/javascript" src="third_party/download.js"></script>
<script type="text/javascript" src="js/ide.js"></script>
<link type="text/css" rel="stylesheet" href="css/ide.css">
<title>Judge0 IDE - Free and open-source online code editor</title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<link rel="icon" href="./favicon.ico" type="image/x-icon">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-83802640-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-83802640-2');
</script>
<script type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="ee4621ff-c682-44ac-8cfa-1835beddb98a";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
</head>
<body>
<div id="site-navigation" class="ui small inverted menu">
<div id="site-header" class="header item">
<a href="/">
<img id="site-icon" src="./images/judge0_icon.png">
<h2>Judge0 IDE</h2>
</a>
</div>
<div class="left menu">
<div class="ui dropdown item site-links on-hover">
File <i class="dropdown icon"></i>
<div class="menu">
<a class="item" target="_blank" href="/"><i class="file code icon"></i> New File</a>
<div class="item" onclick="save()"><i class="save icon"></i> Save (Ctrl + S)</div>
<div class="item" onclick="downloadSource()"><i class="download icon"></i> Download</div>
<!-- <div class="item"><i class="share icon"></i> Share</div> -->
<div id="insert-template-btn" class="item"><i class="file code outline icon"></i> Insert template
for current language</div>
</div>
</div>
<div class="link item" onclick="$('#site-settings').modal('show')"><i class="cog icon"></i> Settings</div>
<div class="item borderless">
<select id="select-language" class="ui dropdown">
<option value="45" mode="UNKNOWN">Assembly (NASM 2.14.02)</option> <!-- Unknown mode. Help needed. -->
<option value="46" mode="shell">Bash (5.0.0)</option>
<option value="47" mode="UNKNOWN">Basic (FBC 1.07.1)</option> <!-- Unknown mode. Help needed. -->
<option value="1011" mode="UNKNOWN">Bosque (latest)</option> <!-- Unknown mode. Help needed. -->
<option value="75" mode="c">C (Clang 7.0.1)</option>
<option value="1013" mode="c">C (Clang 9.0.1)</option>
<option value="1001" mode="c">C (Clang 10.0.1)</option>
<option value="48" mode="c">C (GCC 7.4.0)</option>
<option value="49" mode="c">C (GCC 8.3.0)</option>
<option value="50" mode="c">C (GCC 9.2.0)</option>
<option value="51" mode="csharp">C# (Mono 6.6.0.161)</option>
<option value="1017" mode="csharp">C# (Mono 6.10.0.104)</option>
<option value="1016" mode="csharp">C# (.NET Core SDK 3.1.302)</option>
<option value="1018" mode="csharp">C# Test (.NET Core SDK 3.1.302, NUnit 3.12.0)</option>
<option value="76" mode="cpp">C++ (Clang 7.0.1)</option>
<option value="1014" mode="cpp">C++ (Clang 9.0.1)</option>
<option value="1002" mode="cpp">C++ (Clang 10.0.1)</option>
<option value="52" mode="cpp">C++ (GCC 7.4.0)</option>
<option value="53" mode="cpp">C++ (GCC 8.3.0)</option>
<option value="54" mode="cpp">C++ (GCC 9.2.0)</option>
<option value="1015" mode="cpp">C++ Test (Clang 10.0.1, Google Test 1.8.1)</option>
<option value="1012" mode="cpp">C++ Test (GCC 8.4.0, Google Test 1.8.1)</option>
<option value="1003" mode="c">C3 (latest)</option> <!-- Replacement mode. Help needed. -->
<option value="86" mode="clojure">Clojure (1.10.1)</option>
<option value="77" mode="UNKNOWN">COBOL (GnuCOBOL 2.2)</option> <!-- Unknown mode. Help needed. -->
<option value="55" mode="UNKNOWN">Common Lisp (SBCL 2.0.0)</option> <!-- Unknown mode. Help needed. -->
<option value="56" mode="UNKNOWN">D (DMD 2.089.1)</option> <!-- Unknown mode. Help needed. -->
<option value="57" mode="UNKNOWN">Elixir (1.9.4)</option> <!-- Unknown mode. Help needed. -->
<option value="58" mode="UNKNOWN">Erlang (OTP 22.2)</option> <!-- Unknown mode. Help needed. -->
<option value="44" mode="plaintext">Executable</option>
<option value="87" mode="fsharp">F# (.NET Core SDK 3.1.202)</option>
<option value="1019" mode="fsharp">F# (.NET Core SDK 3.1.302)</option>
<option value="59" mode="UNKNOWN">Fortran (GFortran 9.2.0)</option> <!-- Unknown mode. Help needed. -->
<option value="60" mode="go">Go (1.13.5)</option>
<option value="88" mode="UNKNOWN">Groovy (3.0.3)</option> <!-- Unknown mode. Help needed. -->
<option value="61" mode="UNKNOWN">Haskell (GHC 8.8.1)</option> <!-- Unknown mode. Help needed. -->
<option value="62" mode="java">Java (OpenJDK 13.0.1)</option>
<option value="1004" mode="java">Java (OpenJDK 14.0.1)</option>
<option value="1005" mode="java">Java Test (OpenJDK 14.0.1, JUnit Platform Console Standalone 1.6.2)</option>
<option value="63" mode="javascript">JavaScript (Node.js 12.14.0)</option>
<option value="78" mode="kotlin">Kotlin (1.3.70)</option>
<option value="64" mode="lua">Lua (5.3.5)</option>
<option value="1006" mode="c">MPI (OpenRTE 3.1.3) with C (GCC 8.3.0)</option>
<option value="1007" mode="cpp">MPI (OpenRTE 3.1.3) with C++ (GCC 8.3.0)</option>
<option value="1008" mode="python">MPI (OpenRTE 3.1.3) with Python (3.7.3)</option>
<option value="1009" mode="python">Nim (stable)</option> <!-- Replacement mode. Help needed. -->
<option value="79" mode="objective-c">Objective-C (Clang 7.0.1)</option>
<option value="65" mode="UNKNOWN">OCaml (4.09.0)</option> <!-- Unknown mode. Help needed. -->
<option value="66" mode="UNKNOWN">Octave (5.1.0)</option> <!-- Unknown mode. Help needed. -->
<option value="67" mode="pascal">Pascal (FPC 3.0.4)</option>
<option value="85" mode="perl">Perl (5.28.1)</option>
<option value="68" mode="php">PHP (7.4.1)</option>
<option value="43" mode="plaintext">Plain Text</option>
<option value="69" mode="UNKNOWN">Prolog (GNU Prolog 1.4.5)</option> <!-- Unknown mode. Help needed. -->
<option value="70" mode="python">Python (2.7.17)</option>
<option value="71" mode="python">Python (3.8.1)</option>
<option value="1010" mode="python">Python for ML (3.7.3)</option>
<option value="80" mode="r">R (4.0.0)</option>
<option value="72" mode="ruby">Ruby (2.7.0)</option>
<option value="73" mode="rust">Rust (1.40.0)</option>
<option value="81" mode="UNKNOWN">Scala (2.13.2)</option> <!-- Unknown mode. Help needed. -->
<option value="82" mode="sql">SQL (SQLite 3.27.2)</option>
<option value="83" mode="swift">Swift (5.2.3)</option>
<option value="74" mode="typescript">TypeScript (3.7.4)</option>
<option value="84" mode="vb">Visual Basic.Net (vbnc 0.0.0.5943)</option> <!-- (vbnc 0.0.0.5943) -->
</select>
</div>
<div class="item fitted borderless wide screen only">
<div class="ui input">
<input id="compiler-options" type="text" placeholder="Compiler options"></input>
</div>
</div>
<div class="item borderless wide screen only">
<div class="ui input">
<input id="command-line-arguments" type="text" placeholder="Command line arguments"></input>
</div>
</div>
<div class="item no-left-padding borderless">
<button id="run-btn" class="ui primary labeled icon button"><i class="play icon"></i>Run (F9)</button>
</div>
<div id="navigation-message" class="item borderless">
<span class="navigation-message-text"></span>
</div>
</div>
<div class="right menu">
<div id="updates" class="link item changelogfy-widget">
<i class="fitted bell icon"></i>
</div>
<div class="ui dropdown item site-links">
More
<i class="dropdown icon"></i>
<div class="menu">
<!-- <a id="about" class="link item" target="_blank" href="https://judge0.com/about"><i class="info circle icon"></i> About</a> -->
<a id="about" class="link item" target="_blank" href="https://rapidapi.com/hermanzdosilovic/api/judge0"><i class="server icon"></i> API</a>
<div class="divider"></div>
<a class="item" target="_blank" href="https://www.patreon.com/hermanzdosilovic"><i
class="patreon icon"></i>
Become a Patron</a>
<a class="item" target="_blank" href="https://paypal.me/hermanzdosilovic"><i
class="paypal icon"></i>
Donate with PayPal</a>
<div class="divider"></div>
<a class="item" target="_blank" href="https://github.com/judge0/ide"><i class="github icon"></i>
View source
code on Github</a>
<a class="item" target="_blank" href="https://github.com/judge0/ide/issues/new"><i
class="exclamation circle icon"></i> Report an issue</a>
<div class="divider"></div>
<a class="item" target="_blank" href="https://forms.gle/p3KpGYSjxAbvGUft9"><i class="envelope icon"></i>
Subscribe
to Judge0 newsletter</a>
<a class="item" target="_blank" href="https://discord.gg/GRc3v6n"><i
class="discord icon"></i> Join a Discord server</a>
<div class="divider"></div>
<a class="item" target="_blank" href="mailto:hermanz.dosilovic@gmail.com"><i
class="paper plane icon"></i>
Contact the author</a>
<a class="item" target="_blank" href="https://hermanz.dosilovic.com"><i class="user icon"></i> About
the
author</a>
<div class="divider"></div>
<a class="item" target="_blank"
href="https://www.reddit.com/submit?url=https%3A%2F%2Fide.judge0.com&title=Judge0%20IDE"
style="background-color: #ff4500 !important; color: white !important;"><i
class="reddit icon"></i> Share
on Reddit</a>
<a class="item" target="_blank"
href="https://twitter.com/intent/tweet?text=Judge0%20IDE&url=https%3A%2F%2Fide.judge0.com&via=hermanzvonimir"
style="background-color: #1da1f2 !important; color: white !important;"><i
class="twitter icon"></i>
Share on Twitter</a>
<a class="item" target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fide.judge0.com"
style="background-color: #1877f2 !important; color: white !important;"><i
class="facebook icon"></i>
Share on Facebook</a>
</div>
</div>
</div>
</div>
<div id="site-content"></div>
<div id="site-modal" class="ui modal">
<div class="header">
<i class="close icon"></i>
<span id="title"></span>
</div>
<div class="scrolling content"></div>
<div class="actions">
<div class="ui small labeled icon cancel button">
<i class="remove icon"></i>
Close (ESC)
</div>
</div>
</div>
<div id="site-settings" class="ui modal">
<i class="close icon"></i>
<div class="header">
<i class="cog icon"></i>
Settings
</div>
<div class="content">
<div class="ui form">
<div class="inline fields">
<label>Editor Mode</label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="normal" checked="checked">
<label>Normal</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="vim">
<label>Vim</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="editor-mode" value="emacs">
<label>Emacs</label>
</div>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" name="redirect-output">
<label>Redirect stderr to stdout</label>
</div>
</div>
</div>
</div>
</div>
<div id="site-footer">
<span id="donate-line">
<a class="item" target="_blank" href="https://www.patreon.com/hermanzdosilovic"><i class="patreon icon" style="color: #f06553;"></i> Become a Patron</a>
·
<a class="item" target="_blank" href="https://paypal.me/hermanzdosilovic"><i class="paypal icon" style="color: #00457c;"></i></i> Donate with PayPal</a>
</span>
<div id="editor-status-line"></div>
<span>© 2016-2020 <a href="https://judge0.com">Judge0</a> · Powered by <a href="https://rapidapi.com/hermanzdosilovic/api/judge0">the most advanced open-source online code execution system</a>
<span id="status-line"></span>
</div>
<script>
let CLF_config = {
selector: ".changelogfy-widget",
app_id: "f6f982d0-3d91-4b1c-a3ce-b0eb54606c4e"
};
</script>
<script async src="https://widget.changelogfy.com/index.js"></script>
</body>
</html>

+ 1407
- 0
js/ide.js
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 132
- 0
third_party/download.js ファイルの表示

@ -0,0 +1,132 @@
//download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs
// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support
// data can be a string, Blob, File, or dataURL
function download(data, strFileName, strMimeType) {
var self = window, // this script is only for browsers anyway...
u = "application/octet-stream", // this default mime also triggers iframe downloads
m = strMimeType || u,
x = data,
D = document,
a = D.createElement("a"),
z = function(a){return String(a);},
B = self.Blob || self.MozBlob || self.WebKitBlob || z,
BB = self.MSBlobBuilder || self.WebKitBlobBuilder || self.BlobBuilder,
fn = strFileName || "download",
blob,
b,
ua,
fr;
//if(typeof B.bind === 'function' ){ B=B.bind(self); }
if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
x=[x, m];
m=x[0];
x=x[1];
}
//go ahead and download dataURLs right away
if(String(x).match(/^data\:[\w+\-]+\/[\w+\-]+[,;]/)){
return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:
navigator.msSaveBlob(d2b(x), fn) :
saver(x) ; // everyone else can save dataURLs un-processed
}//end if dataURL passed?
try{
blob = x instanceof B ?
x :
new B([x], {type: m}) ;
}catch(y){
if(BB){
b = new BB();
b.append([x]);
blob = b.getBlob(m); // the blob
}
}
function d2b(u) {
var p= u.split(/[:;,]/),
t= p[1],
dec= p[2] == "base64" ? atob : decodeURIComponent,
bin= dec(p.pop()),
mx= bin.length,
i= 0,
uia= new Uint8Array(mx);
for(i;i<mx;++i) uia[i]= bin.charCodeAt(i);
return new B([uia], {type: t});
}
function saver(url, winMode){
if ('download' in a) { //html5 A[download]
a.href = url;
a.setAttribute("download", fn);
a.innerHTML = "downloading...";
D.body.appendChild(a);
setTimeout(function() {
a.click();
D.body.removeChild(a);
if(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(a.href);}, 250 );}
}, 66);
return true;
}
//do iframe dataURL download (old ch+FF):
var f = D.createElement("iframe");
D.body.appendChild(f);
if(!winMode){ // force a mime that will download:
url="data:"+url.replace(/^data:([\w\/\-\+]+)/, u);
}
f.src = url;
setTimeout(function(){ D.body.removeChild(f); }, 333);
}//end saver
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
return navigator.msSaveBlob(blob, fn);
}
if(self.URL){ // simple fast and modern way using Blob and URL:
saver(self.URL.createObjectURL(blob), true);
}else{
// handle non-Blob()+non-URL browsers:
if(typeof blob === "string" || blob.constructor===z ){
try{
return saver( "data:" + m + ";base64," + self.btoa(blob) );
}catch(y){
return saver( "data:" + m + "," + encodeURIComponent(blob) );
}
}
// Blob but not URL:
fr=new FileReader();
fr.onload=function(e){
saver(this.result);
};
fr.readAsDataURL(blob);
}
return true;
} /* end download() */

読み込み中…
キャンセル
保存