diff --git a/INSTALL.md b/INSTALL.md index ecd86691..5b1061ff 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -116,7 +116,7 @@ UrlToolkit { --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.9.28-2 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.10.8-1 [![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) diff --git a/README.md b/README.md index 75776ad5..dd39ef05 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ -# 🤖 P3X Gitlist - An elegant, feature rich and modern git ui repository viewer v2018.9.28-2 +# 🤖 P3X Gitlist - An elegant, feature rich and modern git ui repository viewer v2018.10.8-1 This is an open-source project. Star this repository, if you like it, or even donate! Thank you so much! :) @@ -182,7 +182,7 @@ npm run watch --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.9.28-2 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.10.8-1 [![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) diff --git a/artifacts/php-7.2-ubuntu.md b/artifacts/php-7.2-ubuntu.md index b0433054..699864bc 100644 --- a/artifacts/php-7.2-ubuntu.md +++ b/artifacts/php-7.2-ubuntu.md @@ -20,7 +20,7 @@ sudo apt upgrade -y --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.9.28-2 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.10.8-1 [![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) diff --git a/changelog.md b/changelog.md index e9fbfa55..9ffd0703 100644 --- a/changelog.md +++ b/changelog.md @@ -178,7 +178,7 @@ require('codemirror/mode/yaml/yaml'); --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.9.28-2 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.10.8-1 [![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) diff --git a/package.json b/package.json index b254a34e..ff362a42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-gitlist", - "version": "2018.10.8-0", + "version": "2018.10.8-2", "corifeus": { "prod-dir": "prod", "postfix": "b2c12b19179d52db3488baed66a493c18ff1737f3dcfa5604783b86c7672078a", @@ -59,6 +59,7 @@ "bootstrap": "^3.3.7", "codemirror": "^5.40.2", "highlight.js": "^9.12.0", + "is-string-int": "^1.0.1", "jquery": "^3.3.1", "jquery.redirect": "^1.1.4", "js-cookie": "^2.2.0", @@ -72,4 +73,4 @@ "snackbarjs": "^1.1.0", "twemoji": "^11.0.1" } -} +} \ No newline at end of file diff --git a/src/browser/js/commit.js b/src/browser/js/commit.js index 5a25033e..08c75a59 100644 --- a/src/browser/js/commit.js +++ b/src/browser/js/commit.js @@ -14,17 +14,21 @@ $(() => { if ($diffEditors.length > 0) { + + for (let diffEditor of $diffEditors) { const $editableHover = $('#' + diffEditor.dataset.diffId); const $diffEditor = $(diffEditor); $editableHover.on('click', () => { const url = new URL(location) $diffEditor.toggle() + $editableHover.toggleClass('active') if (diffEditor.dataset.loaded) { return; } const loopIndex = diffEditor.dataset.loopIndex; + //console.log(loopIndex) diffEditor.dataset.loaded = true url.searchParams.append('ajax', '1') @@ -67,6 +71,19 @@ $(() => { } }).catch(window.gitlist.ajaxErrorHandler) }) + + } + + const isStringInt = require('is-string-int') + if(isStringInt(location.hash.substr(1))) { + const diff = parseInt(location.hash.substr(1)) + const position = `p3x-gitlist-diff-${diff}` + const element = document.getElementById(position); + const diffButton = $(`#p3x-gitlist-diff-data-${diff}`) + setTimeout(() => { + window.gitlist.scrollIntoView(element) + diffButton.click() + }, 500) } } diff --git a/todo.md b/todo.md index fabb2f01..603186ff 100644 --- a/todo.md +++ b/todo.md @@ -32,7 +32,7 @@ --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.9.28-2 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2018.10.8-1 [![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)