Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b8e6d45f
Commit
b8e6d45f
authored
Oct 20, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #59 from chriseth/doNotModifyExistingFiles
Do not modify existing files when loading gists.
parents
01b761c6
736dd604
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
index.html
index.html
+11
-3
No files found.
index.html
View file @
b8e6d45f
...
...
@@ -136,7 +136,7 @@
var
gistId
;
var
key
=
location_query_params
[
index
+
1
];
if
(
key
===
''
)
{
var
str
=
prompt
(
"Enter the URL or ID of the Gist you
'
d like to load."
);
var
str
=
prompt
(
"Enter the URL or ID of the Gist you
woul
d like to load."
);
if
(
str
!==
''
)
{
gistId
=
getGistId
(
str
);
loadingFromGist
=
!!
gistId
;
...
...
@@ -151,8 +151,16 @@
dataType
:
'jsonp'
,
success
:
function
(
response
){
if
(
response
.
data
)
{
for
(
var
f
in
response
.
data
.
files
)
{
window
.
localStorage
[
fileKey
(
f
)]
=
response
.
data
.
files
[
f
].
content
;
for
(
var
f
in
response
.
data
.
files
)
{
var
key
=
fileKey
(
f
);
var
content
=
response
.
data
.
files
[
f
].
content
;
if
(
key
in
window
.
localStorage
&&
window
.
localStorage
[
key
]
!=
content
)
{
var
count
=
''
;
var
otherKey
=
key
+
count
;
while
((
key
+
count
)
in
window
.
localStorage
)
count
=
count
-
1
;
window
.
localStorage
[
key
+
count
]
=
window
.
localStorage
[
key
];
}
window
.
localStorage
[
key
]
=
content
;
}
SOL_CACHE_FILE
=
fileKey
(
Object
.
keys
(
response
.
data
.
files
)[
0
]);
updateFiles
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment