MediaWiki:Common.js: Diferență între versiuni
m |
m |
||
Linia 1: | Linia 1: | ||
+ | Brutus | ||
+ | halfop | ||
+ | Idle | ||
+ | |||
+ | [10:43 AM][Wiki-Manager]Cerro: :-? | ||
+ | [10:43 AM][Discord]Arkan 💘: Ma gandeam la ceva, insa tot mare ar fi aratat | ||
+ | [10:43 AM][Discord]Arkan 💘: Sau... | ||
+ | [10:44 AM][Wiki-Manager]Cerro: | ||
+ | Image | ||
+ | [10:44 AM][Wiki-Manager]Cerro: sau fara imagine la mob | ||
+ | [10:44 AM][Wiki-Manager]Cerro: simpla | ||
+ | [10:44 AM][Wiki-Manager]Cerro: [[ ]] | ||
+ | [10:44 AM][Discord]Arkan 💘: Ui la ceva de genul ma gandeam ca merge | ||
+ | Image | ||
+ | [10:45 AM][Discord]Arkan 💘: Sus e fragmentul de harta, in stanga ii harta si in caseta ar trebui sa fie monstrul | ||
+ | [10:47 AM][Wiki-Manager]Cerro: 😕 | ||
+ | [10:48 AM][Wiki-Manager]Cerro: zici ca esti bunicu cand mi-a desenat tabelul pentru x/0 | ||
+ | [10:48 AM][Discord]Arkan 💘: Ii pretty much acelasi concept ca la eventuri | ||
+ | [10:48 AM][Discord]Arkan 💘: | ||
+ | Image | ||
+ | [10:49 AM]HalfOp 💔: da si daca tot faci, fa si bara asta interactiva : | ||
+ | Image | ||
+ | [10:49 AM]HalfOp 💔: | ||
+ | [10:50 AM][Wiki-Manager]Cerro: 😕 | ||
+ | [10:52 AM][Wiki-Manager]Cerro: Dar noi nu jucam fazan, de ce ne-ai inchis ? | ||
+ | [10:52 AM][Wiki-Manager]Cerro: 😂 | ||
+ | [10:52 AM][Discord]Arkan 💘: Actually.... | ||
+ | [10:53 AM][Discord]Arkan 💘: Ii posibil sa mearga | ||
+ | [10:53 AM][Discord]Arkan 💘: Daca a facut milogu de Arc butoane, putem face si noi | ||
+ | [10:54 AM][Discord]Arkan 💘: Butoanele sa fie stocate intr-un tabel cum ii asta al tau si cand dai click sa iti faca load la acele info-uri | ||
+ | [10:55 AM][Wiki-Manager]Cerro: | ||
+ | [10:55 AM][Wiki-Manager]Cerro: https://ro-wiki.metin2.gameforge.com/index.php/Dc12d12 | ||
+ | Dc12d12 | ||
+ | [10:55 AM][Wiki-Manager]Cerro: le futut de curule | ||
+ | [10:55 AM][Wiki-Manager]Cerro: 🙂 | ||
+ | [10:56 AM][Discord]Arkan 💘: Ceva de genul | ||
+ | [10:57 AM][Wiki-Manager]Cerro: cred ca ma injura si chatgpt la ce ii cer | ||
+ | [10:57 AM][Wiki-Manager]Cerro: ... | ||
+ | [10:57 AM][Wiki-Manager]Cerro: 🐯 | ||
+ | [10:57 AM][Wiki-Manager]Cerro: ceea ce vrei tu, tot cu scrip | ||
+ | [10:57 AM][Wiki-Manager]Cerro: imi face | ||
+ | [10:57 AM][Wiki-Manager]Cerro: <script type="text/javascript"> | ||
+ | function showLoot(monster) { | ||
+ | var loot = { | ||
+ | 'caine': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2'], | ||
+ | 'lup': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2'], | ||
+ | 'lupAlpha': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2', 'Costum de azur +1'], | ||
+ | 'lupAlbastru': ['Coif Schelet +2', 'Cercel de lemn +2', 'Glugă de piele +2'], | ||
+ | 'lupAlphaAlbastru': ['Costum de azur +1', 'Glugă de piele +2'], | ||
+ | 'lupGri': ['Cercel de cupru +2', 'Glugă de piele +2'], | ||
+ | 'lupAlphaGri': ['Costum de azur +1', 'Cercel de cupru +2', 'Cercel de lemn +2'], | ||
+ | 'mistret': ['Coif Schelet +2', 'Glugă de piele +2', 'Cercel de lemn +2'], | ||
+ | 'mistretRosu': ['Coif Schelet +2', 'Cercel de cupru +2', 'Cercel de lemn +2'] | ||
+ | }; | ||
+ | |||
+ | var lootList = document.getElementById('loot-list'); | ||
+ | lootList.innerHTML = ''; | ||
+ | |||
+ | loot[monster].forEach(function(item) { | ||
+ | var li = document.createElement('li'); | ||
+ | li.textContent = item; | ||
+ | lootList.appendChild(li); | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
+ | [10:57 AM][Discord]Arkan 💘: Pai da | ||
+ | [10:57 AM][Discord]Arkan 💘: Din html simplu nu merge. | ||
+ | [10:58 AM][Wiki-Manager]Cerro: https://ro-wiki.metin2.gameforge.com/index.php?title=Dc12d12&stable=0 | ||
+ | Index.php | ||
+ | [10:58 AM][Wiki-Manager]Cerro: da, merge cum zici tu, dar cu script | ||
+ | [10:58 AM][Wiki-Manager]Cerro: 😛 | ||
+ | [10:58 AM][Discord]Arkan 💘: HTML ii doar sa faci layout-ul. CSS ca sa ii dai o forma. JS sa faca actiuni anume | ||
+ | [10:59 AM][Discord]Arkan 💘: Poti selecta din lista? | ||
+ | [10:59 AM][Wiki-Manager]Cerro: pai probabil doar daca faci scripul ala | ||
+ | [10:59 AM]HalfOp 💔: cam asa, si inside sa ai hyperlink, cand dai click pe caine, sa se deschida langa o fereastra noua cu info despre caine | ||
+ | [10:59 AM]HalfOp 💔: 😄 | ||
+ | [10:59 AM][Discord]Arkan 💘: Ah, nu ai inclus si scriptul | ||
+ | [11:00 AM][Wiki-Manager]Cerro: da, dar nu prea ma pricep cu script-ul.. | ||
+ | [11:00 AM][Wiki-Manager]Cerro: 😦 | ||
+ | [11:00 AM]HalfOp 💔: si daca faci asta, poti sa faci pe urma la fel si la inventar si la curea, etc. :smart~1: | ||
+ | [11:00 AM]HalfOp 💔: munca multa dar fain | ||
+ | [11:00 AM][Wiki-Manager]Cerro: abia am invatat sa-l folosesc pe asta.. | ||
+ | [11:00 AM]HalfOp 💔: chatgpt is your bff | ||
+ | [11:01 AM]HalfOp 💔: si aici, in ce ai pus tu: https://ro-wiki.metin2.gameforge.com/index.php/Dc12d12 | ||
+ | Dc12d12 | ||
+ | [11:01 AM]HalfOp 💔: cand dai click pe caine, in fereastra unde scrie sa dai click pe monstru | ||
+ | [11:01 AM]HalfOp 💔: sa-ti apara info | ||
+ | [11:01 AM][Wiki-Manager]Cerro: da | ||
+ | [11:01 AM][Wiki-Manager]Cerro: dar merge fara scriptul asta? | ||
+ | [11:13 AM][Discord]Arkan 💘: Nu | ||
+ | [11:14 AM][Discord]Arkan 💘: Ai nevoie de o logica pe care sa o aplici. Iar pe aia o iei din script | ||
+ | [11:19 AM][Wiki-Manager]Cerro: Eh, o sa luam 1 bax de bere si cand sunteti pe confa incercam o modalitate de genul 🙂 | ||
+ | [11:19 AM][Wiki-Manager]Cerro: ca nu vreau sa ma bag singur unde nu stiu nici 10% :)) | ||
+ | [11:32 AM][Discord]Arkan 💘: Pe asta daca il pui in aceeasi pagina nu merge, nu? | ||
+ | [11:33 AM][Wiki-Manager]Cerro: n-am incercat | ||
+ | [11:35 AM][Discord]Arkan 💘: <javascript> | ||
+ | // Your JavaScript code here | ||
+ | </javascript> | ||
+ | |||
+ | Pune codul acolo unde ii // si incearca sa pui tot block-ul in fisier | ||
+ | [11:35 AM][Wiki-Manager]Cerro: Vad ca a modificat half ceva | ||
+ | [11:37 AM][Discord]Arkan 💘: https://chatgpt.com/share/0f7f031d-a1a1-4049-8484-7f544c990e3f | ||
+ | ChatGPT | ||
+ | A conversational AI system that listens, learns, and challenges | ||
+ | Image | ||
+ | [11:37 AM][Wiki-Manager]Cerro: Stai ca vad ca face half ceva pe acolo 🙂 | ||
+ | [11:38 AM][Discord]Arkan 💘: Testeaza in paralel | ||
+ | [11:38 AM][Discord]Arkan 💘: Vedeti de asta. Mediawiki nu merge sadly ca un document html propriu-zis | ||
+ | [11:38 AM][Discord]Arkan 💘: Worst case scenario, facem template | ||
+ | [11:40 AM][Wiki-Manager]Cerro: stai ca s-a pus half pe el :)) | ||
+ | [11:43 AM][Discord]Arkan 💘: Hmmm, stai ca e interesant | ||
+ | [11:44 AM][Discord]Arkan 💘: Interesanta abordarea | ||
+ | [11:53 AM][Wiki-Manager]Cerro: puteai sa-i bagi un ban | ||
+ | [11:53 AM][Wiki-Manager]Cerro: ca nu-i prima oara cand injura | ||
+ | [11:54 AM][Discord]Arkan 💘: N-a avut | ||
+ | [11:54 AM][Discord]Arkan 💘: A avut de la tine mute de 6h | ||
+ | [12:41 PM][Wiki-Manager]Cerro: mama , are half 26 de modificari deja | ||
+ | [12:41 PM][Wiki-Manager]Cerro: s-a pus rau pe el:) | ||
+ | [12:43 PM]HalfOp 💔: ceva da cu virgula | ||
+ | [12:44 PM]HalfOp 💔: aici; | ||
+ | .catch(function(error) { | ||
+ | var lootList = document.getElementById('loot-list'); | ||
+ | |||
+ | if (lootList) { | ||
+ | var li = document.createElement('li'); | ||
+ | li.textContent = 'Error fetching loot: ' + error.message; | ||
+ | |||
+ | lootList.appendChild(li); | ||
+ | } else { | ||
+ | console.error('Element with ID "loot-list" not found.'); | ||
+ | } | ||
+ | |||
+ | console.error('Error:', error); | ||
+ | }); | ||
+ | ` | ||
+ | [12:44 PM][Discord]Arkan 💘: In ce sens? | ||
+ | [12:44 PM]HalfOp 💔: JavaScript parse error: Parse error: Unexpected token; token 3 expected in file 'MediaWiki:Common.js' on line 73 Dc12d13 line 1 > injectedScript:1:8 | ||
+ | <anonymous> https://ro-wiki.metin2.gameforge.com/index.php/Dc12d13 line 1 > injectedScript:1 | ||
+ | jQuery 7 | ||
+ | DOMEval | ||
+ | globalEval | ||
+ | runScript | ||
+ | checkCssHandles | ||
+ | execute | ||
+ | implement | ||
+ | <anonymous> | ||
+ | Dc12d13 | ||
+ | [12:46 PM][Discord]Arkan 💘: Lasa doar console.error | ||
+ | [12:48 PM]HalfOp 💔: am pus doar | ||
+ | .catch(function(error) { | ||
+ | console.error('Error fetching data from the API:', error); | ||
+ | }); | ||
+ | [12:48 PM]HalfOp 💔: same shit | ||
+ | [12:49 PM]HalfOp 💔: console.error('Error:', error); same shit | ||
+ | [1:10 PM][Discord]Arkan 💘: | ||
+ | ``` | ||
(function() { | (function() { | ||
document.addEventListener('DOMContentLoaded', function() { | document.addEventListener('DOMContentLoaded', function() { | ||
Linia 4: | Linia 160: | ||
var lootList = document.getElementById('loot-list'); | var lootList = document.getElementById('loot-list'); | ||
lootList.innerHTML = ''; | lootList.innerHTML = ''; | ||
+ | Expand | ||
+ | message.txt | ||
+ | 4 KB | ||
+ | [1:11 PM][Discord]Arkan 💘: Vezi asa | ||
+ | [1:11 PM][Discord]Arkan 💘: | ||
+ | Clear Cache (If Needed) | ||
+ | After saving the changes, users might need to clear their browser cache or perform a hard refresh (Ctrl+F5 or Cmd+Shift+R) to ensure the updated JavaScript is loaded. | ||
+ | |||
+ | This code will now be executed site-wide on every page where the conditions are met (e.g., where elements with the IDs loot-list and monster-list exist). | ||
+ | [1:14 PM]HalfOp 💔: tot il doare ceva | ||
+ | [1:15 PM]HalfOp 💔: are o problema cu cache-ul ala | ||
+ | [1:15 PM]HalfOp 💔: catch*ul | ||
+ | [1:15 PM]HalfOp 💔: .catch(function(error) { | ||
+ | console.error('Error:', error); | ||
+ | }); | ||
+ | [1:15 PM]HalfOp 💔: JavaScript parse error: Parse error: Unexpected token; token 3 expected in file 'MediaWiki:Common.js' on line 56 | ||
+ | [1:15 PM][Discord]Arkan 💘: Ia sterge-l | ||
+ | [1:15 PM]HalfOp 💔: -_-\ dev fixed.. | ||
+ | [1:16 PM]HalfOp 💔: logic ca daca nu mai e nu mai da nici eroare la el 😐 | ||
+ | [1:16 PM][Discord]Arkan 💘: Bun | ||
+ | [1:19 PM][Discord]Arkan 💘: | ||
+ | (function() { | ||
+ | document.addEventListener('DOMContentLoaded', function() { | ||
+ | function showLoot(monster) { | ||
+ | var lootList = document.getElementById('loot-list'); | ||
+ | lootList.innerHTML = ''; | ||
+ | Expand | ||
+ | message.txt | ||
+ | 4 KB | ||
+ | [1:19 PM][Discord]Arkan 💘: Posibil chiar catch-ul sa fie problema, sa nu fie utilizabil de mediawiki | ||
+ | [1:20 PM][Discord]Arkan 💘: Asta e o varianta de nu foloseste .catch | ||
+ | | ||
+ | (function() { | ||
+ | document.addEventListener('DOMContentLoaded', function() { | ||
+ | function showLoot(monster) { | ||
+ | var lootList = document.getElementById('loot-list'); | ||
+ | lootList.innerHTML = ''; | ||
var apiUrl = mw.util.wikiScript('api') + '?action=parse&page=' + encodeURIComponent(monster) + '&prop=wikitext&format=json&origin=*'; | var apiUrl = mw.util.wikiScript('api') + '?action=parse&page=' + encodeURIComponent(monster) + '&prop=wikitext&format=json&origin=*'; | ||
− | |||
fetch(apiUrl) | fetch(apiUrl) | ||
Linia 16: | Linia 208: | ||
}) | }) | ||
.then(function(data) { | .then(function(data) { | ||
− | |||
− | |||
var wikitext = data.parse.wikitext['*']; | var wikitext = data.parse.wikitext['*']; | ||
− | console.log( | + | console.log(wikitext); |
if (wikitext.startsWith('#Redirect')) { | if (wikitext.startsWith('#Redirect')) { | ||
Linia 56: | Linia 246: | ||
lootList.appendChild(li); | lootList.appendChild(li); | ||
} | } | ||
− | } | + | }, function(error) { |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
console.error('Error:', error); | console.error('Error:', error); | ||
}); | }); | ||
Linia 78: | Linia 259: | ||
}); | }); | ||
})(); | })(); | ||
+ | message.txt | ||
+ | 4 KB |
Versiunea de la data 22 august 2024 11:20
Brutus
halfop
Idle
[10:43 AM][Wiki-Manager]Cerro: :-?
[10:43 AM][Discord]Arkan 💘: Ma gandeam la ceva, insa tot mare ar fi aratat
[10:43 AM][Discord]Arkan 💘: Sau...
[10:44 AM][Wiki-Manager]Cerro:
Image
[10:44 AM][Wiki-Manager]Cerro: sau fara imagine la mob
[10:44 AM][Wiki-Manager]Cerro: simpla
[10:44 AM][Wiki-Manager]Cerro: [[ ]]
[10:44 AM][Discord]Arkan 💘: Ui la ceva de genul ma gandeam ca merge
Image
[10:45 AM][Discord]Arkan 💘: Sus e fragmentul de harta, in stanga ii harta si in caseta ar trebui sa fie monstrul
[10:47 AM][Wiki-Manager]Cerro: 😕
[10:48 AM][Wiki-Manager]Cerro: zici ca esti bunicu cand mi-a desenat tabelul pentru x/0
[10:48 AM][Discord]Arkan 💘: Ii pretty much acelasi concept ca la eventuri
[10:48 AM][Discord]Arkan 💘:
Image
[10:49 AM]HalfOp 💔: da si daca tot faci, fa si bara asta interactiva :
Image
[10:49 AM]HalfOp 💔:
[10:50 AM][Wiki-Manager]Cerro: 😕
[10:52 AM][Wiki-Manager]Cerro: Dar noi nu jucam fazan, de ce ne-ai inchis ?
[10:52 AM][Wiki-Manager]Cerro: 😂
[10:52 AM][Discord]Arkan 💘: Actually....
[10:53 AM][Discord]Arkan 💘: Ii posibil sa mearga
[10:53 AM][Discord]Arkan 💘: Daca a facut milogu de Arc butoane, putem face si noi
[10:54 AM][Discord]Arkan 💘: Butoanele sa fie stocate intr-un tabel cum ii asta al tau si cand dai click sa iti faca load la acele info-uri
[10:55 AM][Wiki-Manager]Cerro:
[10:55 AM][Wiki-Manager]Cerro: https://ro-wiki.metin2.gameforge.com/index.php/Dc12d12
Dc12d12
[10:55 AM][Wiki-Manager]Cerro: le futut de curule
[10:55 AM][Wiki-Manager]Cerro: 🙂
[10:56 AM][Discord]Arkan 💘: Ceva de genul
[10:57 AM][Wiki-Manager]Cerro: cred ca ma injura si chatgpt la ce ii cer
[10:57 AM][Wiki-Manager]Cerro: ...
[10:57 AM][Wiki-Manager]Cerro: 🐯
[10:57 AM][Wiki-Manager]Cerro: ceea ce vrei tu, tot cu scrip
[10:57 AM][Wiki-Manager]Cerro: imi face
[10:57 AM][Wiki-Manager]Cerro: <script type="text/javascript">
function showLoot(monster) {
var loot = {
'caine': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2'],
'lup': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2'],
'lupAlpha': ['Coif Schelet +2', 'Cercel de lemn +2', 'Cercel de cupru +2', 'Costum de azur +1'],
'lupAlbastru': ['Coif Schelet +2', 'Cercel de lemn +2', 'Glugă de piele +2'],
'lupAlphaAlbastru': ['Costum de azur +1', 'Glugă de piele +2'],
'lupGri': ['Cercel de cupru +2', 'Glugă de piele +2'],
'lupAlphaGri': ['Costum de azur +1', 'Cercel de cupru +2', 'Cercel de lemn +2'],
'mistret': ['Coif Schelet +2', 'Glugă de piele +2', 'Cercel de lemn +2'],
'mistretRosu': ['Coif Schelet +2', 'Cercel de cupru +2', 'Cercel de lemn +2']
};
var lootList = document.getElementById('loot-list');
lootList.innerHTML = '';
loot[monster].forEach(function(item) {
var li = document.createElement('li');
li.textContent = item;
lootList.appendChild(li);
});
}
</script>
[10:57 AM][Discord]Arkan 💘: Pai da
[10:57 AM][Discord]Arkan 💘: Din html simplu nu merge.
[10:58 AM][Wiki-Manager]Cerro: https://ro-wiki.metin2.gameforge.com/index.php?title=Dc12d12&stable=0
Index.php
[10:58 AM][Wiki-Manager]Cerro: da, merge cum zici tu, dar cu script
[10:58 AM][Wiki-Manager]Cerro: 😛
[10:58 AM][Discord]Arkan 💘: HTML ii doar sa faci layout-ul. CSS ca sa ii dai o forma. JS sa faca actiuni anume
[10:59 AM][Discord]Arkan 💘: Poti selecta din lista?
[10:59 AM][Wiki-Manager]Cerro: pai probabil doar daca faci scripul ala
[10:59 AM]HalfOp 💔: cam asa, si inside sa ai hyperlink, cand dai click pe caine, sa se deschida langa o fereastra noua cu info despre caine
[10:59 AM]HalfOp 💔: 😄
[10:59 AM][Discord]Arkan 💘: Ah, nu ai inclus si scriptul
[11:00 AM][Wiki-Manager]Cerro: da, dar nu prea ma pricep cu script-ul..
[11:00 AM][Wiki-Manager]Cerro: 😦
[11:00 AM]HalfOp 💔: si daca faci asta, poti sa faci pe urma la fel si la inventar si la curea, etc. :smart~1:
[11:00 AM]HalfOp 💔: munca multa dar fain
[11:00 AM][Wiki-Manager]Cerro: abia am invatat sa-l folosesc pe asta..
[11:00 AM]HalfOp 💔: chatgpt is your bff
[11:01 AM]HalfOp 💔: si aici, in ce ai pus tu: https://ro-wiki.metin2.gameforge.com/index.php/Dc12d12
Dc12d12
[11:01 AM]HalfOp 💔: cand dai click pe caine, in fereastra unde scrie sa dai click pe monstru
[11:01 AM]HalfOp 💔: sa-ti apara info
[11:01 AM][Wiki-Manager]Cerro: da
[11:01 AM][Wiki-Manager]Cerro: dar merge fara scriptul asta?
[11:13 AM][Discord]Arkan 💘: Nu
[11:14 AM][Discord]Arkan 💘: Ai nevoie de o logica pe care sa o aplici. Iar pe aia o iei din script
[11:19 AM][Wiki-Manager]Cerro: Eh, o sa luam 1 bax de bere si cand sunteti pe confa incercam o modalitate de genul 🙂
[11:19 AM][Wiki-Manager]Cerro: ca nu vreau sa ma bag singur unde nu stiu nici 10% :))
[11:32 AM][Discord]Arkan 💘: Pe asta daca il pui in aceeasi pagina nu merge, nu?
[11:33 AM][Wiki-Manager]Cerro: n-am incercat
[11:35 AM][Discord]Arkan 💘: <javascript>
// Your JavaScript code here
</javascript>
Pune codul acolo unde ii // si incearca sa pui tot block-ul in fisier
[11:35 AM][Wiki-Manager]Cerro: Vad ca a modificat half ceva
[11:37 AM][Discord]Arkan 💘: https://chatgpt.com/share/0f7f031d-a1a1-4049-8484-7f544c990e3f
ChatGPT
A conversational AI system that listens, learns, and challenges
Image
[11:37 AM][Wiki-Manager]Cerro: Stai ca vad ca face half ceva pe acolo 🙂
[11:38 AM][Discord]Arkan 💘: Testeaza in paralel
[11:38 AM][Discord]Arkan 💘: Vedeti de asta. Mediawiki nu merge sadly ca un document html propriu-zis
[11:38 AM][Discord]Arkan 💘: Worst case scenario, facem template
[11:40 AM][Wiki-Manager]Cerro: stai ca s-a pus half pe el :))
[11:43 AM][Discord]Arkan 💘: Hmmm, stai ca e interesant
[11:44 AM][Discord]Arkan 💘: Interesanta abordarea
[11:53 AM][Wiki-Manager]Cerro: puteai sa-i bagi un ban
[11:53 AM][Wiki-Manager]Cerro: ca nu-i prima oara cand injura
[11:54 AM][Discord]Arkan 💘: N-a avut
[11:54 AM][Discord]Arkan 💘: A avut de la tine mute de 6h
[12:41 PM][Wiki-Manager]Cerro: mama , are half 26 de modificari deja
[12:41 PM][Wiki-Manager]Cerro: s-a pus rau pe el:)
[12:43 PM]HalfOp 💔: ceva da cu virgula
[12:44 PM]HalfOp 💔: aici;
.catch(function(error) {
var lootList = document.getElementById('loot-list');
if (lootList) {
var li = document.createElement('li');
li.textContent = 'Error fetching loot: ' + error.message;
lootList.appendChild(li);
} else {
console.error('Element with ID "loot-list" not found.');
}
console.error('Error:', error);
});
`
[12:44 PM][Discord]Arkan 💘: In ce sens?
[12:44 PM]HalfOp 💔: JavaScript parse error: Parse error: Unexpected token; token 3 expected in file 'MediaWiki:Common.js' on line 73 Dc12d13 line 1 > injectedScript:1:8
<anonymous> https://ro-wiki.metin2.gameforge.com/index.php/Dc12d13 line 1 > injectedScript:1
jQuery 7
DOMEval
globalEval
runScript
checkCssHandles
execute
implement
<anonymous>
Dc12d13
[12:46 PM][Discord]Arkan 💘: Lasa doar console.error
[12:48 PM]HalfOp 💔: am pus doar
.catch(function(error) {
console.error('Error fetching data from the API:', error);
});
[12:48 PM]HalfOp 💔: same shit
[12:49 PM]HalfOp 💔: console.error('Error:', error); same shit
[1:10 PM][Discord]Arkan 💘:
```
(function() {
document.addEventListener('DOMContentLoaded', function() {
function showLoot(monster) {
var lootList = document.getElementById('loot-list');
lootList.innerHTML = '';
Expand
message.txt
4 KB
[1:11 PM][Discord]Arkan 💘: Vezi asa
[1:11 PM][Discord]Arkan 💘:
Clear Cache (If Needed)
After saving the changes, users might need to clear their browser cache or perform a hard refresh (Ctrl+F5 or Cmd+Shift+R) to ensure the updated JavaScript is loaded.
This code will now be executed site-wide on every page where the conditions are met (e.g., where elements with the IDs loot-list and monster-list exist).
[1:14 PM]HalfOp 💔: tot il doare ceva
[1:15 PM]HalfOp 💔: are o problema cu cache-ul ala
[1:15 PM]HalfOp 💔: catch*ul
[1:15 PM]HalfOp 💔: .catch(function(error) {
console.error('Error:', error);
});
[1:15 PM]HalfOp 💔: JavaScript parse error: Parse error: Unexpected token; token 3 expected in file 'MediaWiki:Common.js' on line 56
[1:15 PM][Discord]Arkan 💘: Ia sterge-l
[1:15 PM]HalfOp 💔: -_-\ dev fixed..
[1:16 PM]HalfOp 💔: logic ca daca nu mai e nu mai da nici eroare la el 😐
[1:16 PM][Discord]Arkan 💘: Bun
[1:19 PM][Discord]Arkan 💘:
(function() {
document.addEventListener('DOMContentLoaded', function() {
function showLoot(monster) {
var lootList = document.getElementById('loot-list');
lootList.innerHTML = '';
Expand
message.txt
4 KB
[1:19 PM][Discord]Arkan 💘: Posibil chiar catch-ul sa fie problema, sa nu fie utilizabil de mediawiki
[1:20 PM][Discord]Arkan 💘: Asta e o varianta de nu foloseste .catch
(function() {
document.addEventListener('DOMContentLoaded', function() {
function showLoot(monster) {
var lootList = document.getElementById('loot-list');
lootList.innerHTML = '';
var apiUrl = mw.util.wikiScript('api') + '?action=parse&page=' + encodeURIComponent(monster) + '&prop=wikitext&format=json&origin=*';
fetch(apiUrl)
.then(function(response) {
if (!response.ok) {
throw new Error('Network response was not ok: ' + response.statusText);
}
return response.json();
})
.then(function(data) {
var wikitext = data.parse.wikitext['*'];
console.log(wikitext);
if (wikitext.startsWith('#Redirect')) {
var targetPageMatch = wikitext.match(/\[\[([^\]]+)\]\]/);
if (targetPageMatch) {
var targetPage = targetPageMatch[1];
var redirectUrl = mw.util.wikiScript('api') + '?action=parse&page=' + encodeURIComponent(targetPage) + '&prop=wikitext&format=json&origin=*';
return fetch(redirectUrl)
.then(function(response) {
if (!response.ok) {
throw new Error('Redirect Network response was not ok: ' + response.statusText);
}
return response.json();
});
}
}
return data;
})
.then(function(data) {
var wikitext = data.parse.wikitext['*'];
var weapondropsMatch = wikitext.match(/\|Weapondrops\s*=\s*([^\n|]*)/);
if (weapondropsMatch) {
var weapondrops = weapondropsMatch[1].trim();
var lootItems = weapondrops.split('::');
lootItems.forEach(function(item) {
if (item.trim()) {
var li = document.createElement('li');
li.textContent = item.trim();
lootList.appendChild(li);
}
});
} else {
var li = document.createElement('li');
li.textContent = 'No weapon drops found';
lootList.appendChild(li);
}
}, function(error) {
console.error('Error:', error);
});
}
var items = document.querySelectorAll('#monster-list li');
items.forEach(function(item) {
item.addEventListener('click', function() {
showLoot(item.getAttribute('data-monster'));
});
});
});
})();
message.txt
4 KB