merge fix
This commit is contained in:
parent
65c5b61829
commit
edff1c9ebd
27
fetch.js
27
fetch.js
|
@ -1,35 +1,9 @@
|
|||
const url = "http://localhost/p20/get.php"
|
||||
<<<<<<< HEAD
|
||||
let lista
|
||||
=======
|
||||
>>>>>>> dev2
|
||||
|
||||
fetch(url)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
<<<<<<< HEAD
|
||||
// console.log(data)
|
||||
sortujSufiksy(data)
|
||||
})
|
||||
|
||||
function sortujSufiksy(data) {
|
||||
|
||||
data.forEach((element) => { console.log(element) });
|
||||
|
||||
// const slowo = document.getElementById('slowo').value;
|
||||
// console.log("tetst" + slowo)
|
||||
// const sufiksy = [];
|
||||
// for (let i = 0; i < slowo.length; i++) {
|
||||
// sufiksy.push(slowo.slice(i));
|
||||
// }
|
||||
// document.getElementById('nieposortowane').textContent = formatSufiksy(sufiksy);
|
||||
// sufiksy.sort();
|
||||
// document.getElementById('posortowane').textContent = formatSufiksy(sufiksy);
|
||||
}
|
||||
|
||||
function formatSufiksy(sufiksy) {
|
||||
return sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n');
|
||||
=======
|
||||
sortujSufiksy(data)
|
||||
});
|
||||
|
||||
|
@ -49,5 +23,4 @@ function sortujSufiksy(data) {
|
|||
|
||||
function formatSufiksy(sufiksy) {
|
||||
// console.log(sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n'));
|
||||
>>>>>>> dev2
|
||||
}
|
|
@ -14,15 +14,9 @@
|
|||
<input type="text" id="slowo" placeholder="Podaj słowo">
|
||||
<button onclick="sortujSufiksy()">Sortuj Sufiksy</button>
|
||||
<h2>Nieposortowane Sufiksy</h2>
|
||||
<<<<<<< HEAD
|
||||
<pre id="nieposortowane"></pre>
|
||||
<h2>Posortowane Sufiksy</h2>
|
||||
<pre id="posortowane"></pre>
|
||||
=======
|
||||
<div class="pre" id="nieposortowane"></div>
|
||||
<h2>Posortowane Sufiksy</h2>
|
||||
<div class="pre" id="posortowane"></div>
|
||||
>>>>>>> dev2
|
||||
<script src="fetch.js"></script>
|
||||
|
||||
<li id="lista">
|
||||
|
|
|
@ -45,9 +45,6 @@ h2 {
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
pre {
|
||||
=======
|
||||
#nieposortowane {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -55,14 +52,9 @@ pre {
|
|||
|
||||
|
||||
/* .pre {
|
||||
>>>>>>> dev2
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto;
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
=======
|
||||
} */
|
||||
>>>>>>> dev2
|
||||
|
|
Loading…
Reference in New Issue