User:Docmoates/Social: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 139: | Line 139: | ||
<script> | <script> | ||
mw.loader.using([' | (window.RLQ=window.RLQ||[]).push(function(){ | ||
mw.loader.using(['mediawiki.api','mediawiki.util']).then(function(){ | |||
var user=mw.config.get('wgUserName')||'Guest'; | var user=mw.config.get('wgUserName')||'Guest'; | ||
var photo=localStorage.getItem('sf_photo_'+user)||''; | var photo=localStorage.getItem('sf_photo_'+user)||''; | ||
| Line 173: | Line 174: | ||
}); | }); | ||
document.querySelectorAll('.sf-tab').forEach(function(tab){ | document.querySelectorAll('.sf-tab').forEach(function(tab){ | ||
tab.addEventListener('click',function(){ | tab.addEventListener('click',function(){ | ||
| Line 183: | Line 183: | ||
}); | }); | ||
gel('add-image-btn').addEventListener('click',function(){ | gel('add-image-btn').addEventListener('click',function(){ | ||
gel('image-modal').classList.add('active'); | gel('image-modal').classList.add('active'); | ||
| Line 196: | Line 195: | ||
}); | }); | ||
var uploadZone=gel('upload-zone'); | var uploadZone=gel('upload-zone'); | ||
var fileInput=gel('file-input'); | var fileInput=gel('file-input'); | ||
| Line 223: | Line 221: | ||
} | } | ||
gel('image-url-input').addEventListener('input',function(){ | gel('image-url-input').addEventListener('input',function(){ | ||
var url=this.value.trim(); | var url=this.value.trim(); | ||
| Line 234: | Line 231: | ||
}); | }); | ||
gel('image-add-btn').addEventListener('click',function(){ | gel('image-add-btn').addEventListener('click',function(){ | ||
var activeTab=document.querySelector('.sf-tab.active').dataset.tab; | var activeTab=document.querySelector('.sf-tab.active').dataset.tab; | ||
| Line 372: | Line 368: | ||
load(); | load(); | ||
}); | |||
}); | }); | ||
</script> | </script> | ||
</div> | </div> | ||
</html> | </html> | ||
Revision as of 02:52, 3 February 2026
Upload to wiki first, then paste URL
Uploading...