Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs-editor
Commits
0c29519c
Commit
0c29519c
authored
Jun 08, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename crib-sw-storage-gadget to be more easily accessible
parent
27df4d52
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
crib-enable.html
crib-enable.html
+1
-1
crib-enable.js
crib-enable.js
+0
-0
gadget/crib-sw-gadget.js
gadget/crib-sw-gadget.js
+2
-2
gadget/gadget_cribjs_page_select_site.html
gadget/gadget_cribjs_page_select_site.html
+2
-2
gadget/gadget_cribjs_page_select_site.js
gadget/gadget_cribjs_page_select_site.js
+1
-1
gadget/gadget_landing_cribjs.js
gadget/gadget_landing_cribjs.js
+1
-1
landing.html
landing.html
+1
-1
landing.js
landing.js
+1
-1
No files found.
gadget/crib-sw-storage-gadget
.html
→
crib-enable
.html
View file @
0c29519c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<script
src=
"/lib/jio-latest.js"
type=
"text/javascript"
></script>
<script
src=
"/lib/jio-latest.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"crib-
sw-storage-gadget
.js"
type=
"text/javascript"
></script>
<script
src=
"crib-
enable
.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
...
...
gadget/crib-sw-storage-gadget
.js
→
crib-enable
.js
View file @
0c29519c
File moved
gadget/crib-sw-gadget.js
View file @
0c29519c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
var
storage_gadget
,
site_editor_gadget_url
,
getURL
=
window
.
location
;
var
storage_gadget
,
site_editor_gadget_url
,
getURL
=
window
.
location
;
return
gadget
.
getSetting
(
return
gadget
.
getSetting
(
"
site_editor_gadget_url
"
,
"
site_editor_gadget_url
"
,
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
gadget/crib-sw-storage-gadget
.html
"
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
crib-enable
.html
"
)
)
.
push
(
function
(
url
)
{
.
push
(
function
(
url
)
{
if
(
gadget
.
props
.
storage_gadget_url
==
url
)
{
if
(
gadget
.
props
.
storage_gadget_url
==
url
)
{
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
.
push
(
function
(
element
)
{
.
push
(
function
(
element
)
{
var
getURL
=
window
.
location
;
var
getURL
=
window
.
location
;
g
.
props
.
element
=
element
;
g
.
props
.
element
=
element
;
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
gadget/crib-sw-storage-gadget
.html
"
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
crib-enable
.html
"
});
});
})
})
.
ready
(
function
(
gadget
)
{
.
ready
(
function
(
gadget
)
{
...
...
gadget/gadget_cribjs_page_select_site.html
View file @
0c29519c
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<div
class=
"nav_content save_load container"
>
<div
class=
"nav_content save_load container"
>
<h3>
Site Editor Gadget URL
</h3>
<h3>
Site Editor Gadget URL
</h3>
<p>
Enter the URL of the Crib Gadget from the site you want to edit. If you want to edit this site use:
<p>
Enter the URL of the Crib Gadget from the site you want to edit. If you want to edit this site use:
"/
gadget/crib-sw-storage-gadget
.html"
</p>
"/
crib-enable
.html"
</p>
<div
class=
"row"
>
<div
class=
"row"
>
<table
class=
"table"
>
<table
class=
"table"
>
<tr>
<tr>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"url"
class=
"col-sm-2 control-label"
>
URL
</label>
<label
for=
"url"
class=
"col-sm-2 control-label"
>
URL
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control url"
id=
"url"
value=
"/
gadget/crib-sw-storage-gadget
.html"
>
<input
type=
"text"
class=
"form-control url"
id=
"url"
value=
"/
crib-enable
.html"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
gadget/gadget_cribjs_page_select_site.js
View file @
0c29519c
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
var
getURL
=
window
.
location
;
var
getURL
=
window
.
location
;
return
gadget
.
getSetting
(
return
gadget
.
getSetting
(
"
site_editor_gadget_url
"
,
"
site_editor_gadget_url
"
,
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
gadget/crib-sw-storage-gadget
.html
"
getURL
.
protocol
+
"
//
"
+
getURL
.
host
+
"
/
crib-enable
.html
"
)
)
})
})
.
push
(
function
(
site_editor_gadget_url
)
{
.
push
(
function
(
site_editor_gadget_url
)
{
...
...
gadget/gadget_landing_cribjs.js
View file @
0c29519c
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
function
getSetting
(
gadget
,
key
,
default_value
)
{
function
getSetting
(
gadget
,
key
,
default_value
)
{
if
(
key
===
"
site_editor_gadget_url
"
)
{
if
(
key
===
"
site_editor_gadget_url
"
)
{
return
window
.
location
.
protocol
+
"
//
"
+
window
.
location
.
host
+
"
/
gadget/crib-sw-storage-gadget
.html
"
return
window
.
location
.
protocol
+
"
//
"
+
window
.
location
.
host
+
"
/
crib-enable
.html
"
}
}
return
default_value
;
return
default_value
;
}
}
...
...
landing.html
View file @
0c29519c
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<h3>
Edit this Site
</h3>
<h3>
Edit this Site
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Edit URL:
<label>
Edit URL:
<input
name=
"edit-url"
class=
"edit-url form-control"
type=
"text"
size=
"60"
readonly
value=
"/
gadget/crib-sw-storage-gadget
.html"
></label>
<input
name=
"edit-url"
class=
"edit-url form-control"
type=
"text"
size=
"60"
readonly
value=
"/
crib-enable
.html"
></label>
</div>
</div>
</div>
</div>
<div
class=
"nav_content container"
>
<div
class=
"nav_content container"
>
...
...
landing.js
View file @
0c29519c
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
site
=
getURL
.
protocol
+
"
//
"
+
getURL
.
host
,
site
=
getURL
.
protocol
+
"
//
"
+
getURL
.
host
,
params
=
getParameterDict
(),
params
=
getParameterDict
(),
edit_url
=
"
https://
"
+
makeid
(
10
)
+
"
.cribjs.nexedi.net/crib-editor4/#page=editor&url=
"
edit_url
=
"
https://
"
+
makeid
(
10
)
+
"
.cribjs.nexedi.net/crib-editor4/#page=editor&url=
"
+
site
+
"
&crib_enable_url=
"
+
site
+
"
/
gadget/crib-sw-storage-gadget
.html
"
;
+
site
+
"
&crib_enable_url=
"
+
site
+
"
/
crib-enable
.html
"
;
gadget
.
props
.
element
.
querySelector
(
"
a.edit-url
"
).
href
=
edit_url
;
gadget
.
props
.
element
.
querySelector
(
"
a.edit-url
"
).
href
=
edit_url
;
if
(
params
.
hasOwnProperty
(
"
from_path
"
)
)
{
if
(
params
.
hasOwnProperty
(
"
from_path
"
)
)
{
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-from-zip-path
"
).
value
=
params
.
from_path
;
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-from-zip-path
"
).
value
=
params
.
from_path
;
...
...
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