From 0155f99e5805abd916f47a00c98d32c9a7d81b85 Mon Sep 17 00:00:00 2001 From: rugk Date: Sun, 1 Mar 2026 18:41:16 +0000 Subject: [PATCH] test: import privatebin.js --- js/common.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/common.js b/js/common.js index 849e6535..09e38bee 100644 --- a/js/common.js +++ b/js/common.js @@ -24,6 +24,16 @@ global.cleanup = function () { } global.$ = global.jQuery = require('./jquery-3.7.1'); + // reload the core library to capture the new window/document in any + // closures (TopNav, PasteViewer, etc). This also refreshes event bindings + // and cached element lookups. + try { + delete require.cache[require.resolve('./privatebin')]; + } catch (e) { + // ignore + } + require('./privatebin'); + // also re-export the PrivateBin namespace if available if (typeof window !== 'undefined' && window.PrivateBin) { global.PrivateBin = window.PrivateBin;