Skip to content

Add documentation to published resizeIframe#30

Open
rossjrw wants to merge 2 commits into
mainfrom
unminify-resizeiframe
Open

Add documentation to published resizeIframe#30
rossjrw wants to merge 2 commits into
mainfrom
unminify-resizeiframe

Conversation

@rossjrw

@rossjrw rossjrw commented Jun 27, 2026

Copy link
Copy Markdown
Member

https://interwiki.scpwiki.com/resizeIframe.js is currently:

var resizeIframe=(function(){var u=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var d=function(n,e){for(var t in e)u(n,t,{get:e[t],enumerable:!0})},v=function(n,e,t,r){if(e&&typeof e=="object"||typeof e=="function")for(var i=f(e),c=0,o=i.length,a;c<o;c++)a=i[c],!p.call(n,a)&&a!==t&&u(n,a,{get:function(s){return e[s]}.bind(null,a),enumerable:!(r=m(e,a))||r.enumerable});return n};var z=function(n){return v(u({},"__esModule",{value:!0}),n)};var x={};d(x,{createResizeIframe:function(){return y},debounce:function(){return l}});function y(n,e,t){t==null&&(t=750);var r=document.getElementById("resizer-container");r==null&&(r=document.createElement("div"),r.id="resizer-container",document.body.appendChild(r));var i=document.createElement("iframe");i.style.display="none",r.appendChild(i),e=e.replace(/^\/+/,"");var c=function(o){o==null&&(o=r.getBoundingClientRect().top,o&&(o+=1));var a=n+"/common--javascript/resize-iframe.html?#"+o+"/"+e;i.src!==a&&(i.src="about:blank",setTimeout(function(){i.src=a},50))};return l(c,t)}function l(n,e){var t=0;return function(){var r=this,i=arguments;clearTimeout(t),t=setTimeout(function(){n.apply(r,i)},e)}}return z(x);})();
//# sourceMappingURL=resizeIframe.js.map

considering that this is the URL casual users in the wild will encounter, and be recommended to use by people like me, this is basically useless. a bit of documentation to explain what it does and how to use it, along with making the code readable, would go a long way

this PR's version: https://interwiki.scpwiki.com/pr-preview/pr-30/resizeIframe.js

rossjrw added 2 commits June 27, 2026 01:04
Skips esbuild entirely - keeps documentation comments, keeps the code
readable at a glance, and it's already ES5 anyway so no risk of
backwards compatibility breakage.
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://scpwiki.github.io/interwiki/pr-preview/pr-30/

Built to branch gh-pages at 2026-06-27 00:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant