Closed xtex404 closed 4 years ago
I cannot reproduce your error, and these changes break the plugin for me.
When I tried your changes, the frame for the codes stopped displaying all together. Checking the source of the page draw after applying these changes, the source seems the same. However, clicking the script source urls that the plugin injects into head produced the following:
<iframe style="display:none" src="javascript:parent.location.replace('https://sho.rt'+(parent.location.hash||''))">
instead of the actual files that are supposed to be linked there.
QRs were not displaying; server was showing a ton of 404 and 403 errors.
plugin.php was passing "dirname" for the plugin.php to yourls_plugincall(), which was creating URLs that looked like this: `<script src="https://____.sh/user/plugins/home/jmedlock/www/site1/github-plugins-YOURLS/YOURLS-IQRCodes/iqrcodes/assets/md5.min.js?v=2.1.2" type="text/javascript">`.
Added a basename so it only passed the directory name housing the plugin.php, and URLs are now correct. QR's and other assets are now loaded and shown properly.