Skip to content

Commit

Permalink
cache bust doesn't help, removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
zfedoran committed Feb 13, 2022
1 parent a833419 commit cdec6df
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const diff = require('semver/functions/diff');
function activate(context) {
this.extensionName = 'ZelimirFedoran.solanabeach-vscode';
this.cntx = context;

const cache_bust = '?v=' + Math.random();

const config = vscode.workspace.getConfiguration("solanabeach22");

Expand Down Expand Up @@ -61,9 +59,9 @@ function activate(context) {

if (!isEnabled) {
// delete solanabeach script tag if there
let output = html.replace(/^.*(<!-- SOLANABEACH 22 --><script src="solana-solanabeach.js(\?v=0\.\d+)?"><\/script><!-- NEON DREAMS -->).*\n?/mg, '');
let output = html.replace(/^.*(<!-- SOLANABEACH 22 --><script src="solana-solanabeach.js"><\/script><!-- NEON DREAMS -->).*\n?/mg, '');
// add script tag
output = html.replace(/\<\/html\>/g, ` <!-- SOLANABEACH 22 --><script src="solana-solanabeach.js`+cache_bust+`"></script><!-- NEON DREAMS -->\n`);
output = html.replace(/\<\/html\>/g, ` <!-- SOLANABEACH 22 --><script src="solana-solanabeach.js"></script><!-- NEON DREAMS -->\n`);
output += '</html>';

fs.writeFileSync(htmlFile, output, "utf-8");
Expand Down

0 comments on commit cdec6df

Please sign in to comment.