First of all, I should say that I don't have a lot of experience in coding.
I'm writing a userscript to use with Tapermonkey in Chrome.
The idea is to append the string &f=%20license:"Creative+Commons+0"
to the url freesound.org/search
in case it doesn't find it there.
// ==UserScript==
// @match https://freesound.org/search*
// ==/UserScript==
(function() {
'use strict';
if (!window.location.href.match(/&f=%20license:"Creative+Commons+0"/)) {
window.location.href += "&f=%20license:"Creative+Commons+0"";
}
})();
The problem I'm running into is that the string I'm trying to append has quotation marks and the javascript delimiters (if that's what they're called) for the appended text are also quotation marks.
I'm sure there's a very simple solution for this. I just couldn't find it by searching in here.
Thank you