mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 20:22:32 +00:00
* Edit max line length * oh god * ts also * rebuild tgui * Format again after conflicts resolving * Me rebuild tgui * this is minified * this is removed * rebuild tgui
27 lines
548 B
JavaScript
27 lines
548 B
JavaScript
var uid;
|
|
|
|
function allowDrop(ev) {
|
|
ev.preventDefault();
|
|
}
|
|
|
|
function drag(ev) {
|
|
var index = ev.target.getAttribute('index');
|
|
if (index) {
|
|
ev.dataTransfer.setData('text', index);
|
|
}
|
|
}
|
|
|
|
function drop(ev) {
|
|
ev.preventDefault();
|
|
var data = ev.dataTransfer.getData('text');
|
|
if (data && ev.target.getAttribute('index')) {
|
|
window.location = '?src=' + uid + ';' + 'cut=' + data + ';' + 'insert=' + ev.target.getAttribute('index');
|
|
}
|
|
}
|
|
|
|
function setUid() {
|
|
uid = document.getElementById('choices').getAttribute('uid');
|
|
}
|
|
|
|
window.onload = setUid;
|