Skip to content

Commit

Permalink
p3x-robot sunday release 2018-5-15 01:44:07
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 14, 2018
1 parent cf5d41c commit 745faa0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ UrlToolkit {

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.32-606
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.34-610

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



# 🤖 P3X Gitlist v2.0.32-606
# 🤖 P3X Gitlist v2.0.34-610

This is an open-source project. Star this repository if you like it, or even donate! Thank you so much! :)

Expand Down Expand Up @@ -145,7 +145,7 @@ npm run watch

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.32-606
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.34-610

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/php-7.2-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sudo apt upgrade -y

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.32-606
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.34-610

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ require('codemirror/mode/yaml/yaml');

---

[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.32-606
[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.0.34-610

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p3x-gitlist",
"version": "2.0.32-606",
"version": "2.0.34-610",
"corifeus": {
"prefix": "p3x-",
"publish": false,
Expand Down
37 changes: 24 additions & 13 deletions public/js/code-mirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ document.addEventListener("DOMContentLoaded", function(event) {

const codeSmall = $('#p3x-gitlist-file-small');
const codeBig = $('#p3x-gitlist-file-codemirror');
const value = sourceCode.text();
const maxSize = 64;
const size = Math.ceil(value.length / 1024);

const defaultInfo = `You enabled the full mode instead of scroll mode.<br/>
This can be slow. Scroll mode is fast!<br/>
The maximum auto parsed code size is ${maxSize} KB.<br/>
This code is ${size} KB. `

const createCodeMirror = () => {
codeSmall.hide();
Expand Down Expand Up @@ -38,11 +46,21 @@ document.addEventListener("DOMContentLoaded", function(event) {
buttonScroll.click(setScroll)

const setFull = () => {
buttonScroll.removeClass('active')
buttonFull.addClass('active')
codeMirror.css('height', 'auto')
gitlist.viewer.setSize(null, '100%');
Cookies.set(cookieName, 'full', cookieSettings)

if (currentSizing !== 'full' && size > maxSize) {
$.snackbar({
htmlAllowed: true,
content: defaultInfo,
timeout: 30000,
});
}
setTimeout(() => {
buttonScroll.removeClass('active')
buttonFull.addClass('active')
codeMirror.css('height', 'auto')
gitlist.viewer.setSize(null, '100%');
Cookies.set(cookieName, 'full', cookieSettings)
}, 250)
}

buttonFull.click(setFull)
Expand All @@ -65,9 +83,6 @@ document.addEventListener("DOMContentLoaded", function(event) {
}
}

const value = sourceCode.text();
const maxSize = 64;
const size = Math.ceil(value.length / 1024);
if (size > maxSize && currentSizing === 'full') {
codeBig.hide();
codeSmall.show();
Expand All @@ -78,11 +93,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
setTimeout(() => {
$.snackbar({
htmlAllowed: true,
content: `
You enabled the full mode instead of scroll mode.<br/>
This can be slow. Scroll mode is fast!<br/>
The maximum auto parsed code size is ${maxSize} KB.<br/>
This code is ${size} KB. Auro-parsing disabled!<br/>
content: `${defaultInfo} Auro-parsing disabled!<br/>
To see the parsed code, click the <strong>Parse code</strong> button.
`,
timeout: 30000,
Expand Down

0 comments on commit 745faa0

Please sign in to comment.