Category : firefox

In my angular project. I’m getting below mentioned error refused to create a worker from ‘blob:http://localhost:4200/d8633b89-9f70-4fd6-b08a-e369ccd34273’ because it violates the following Content Security Policy directive: "script-src ‘self’ ‘unsafe-eval’ https://cdn.jsdelivr.net/npm/[email protected]/es5/build/pdf.worker.js". Note that ‘worker-src’ was not explicitly set, so ‘script-src’ is used as a fallback. I know its related Content security policy. I have set up CSP. ..

Read more

I’m working on integrating screen capturing in a framework I’m expanding. I’m requesting the MediaStream of the screen through the getDisplayMedia method and recording it using the RecordRTC library. Both Firefox and Chrome allow the user specify what exactly will be shared, like the entire screen, a specific window or a single tab (only Chrome). ..

Read more

When I run ev.path in Firefox, I get this error. It works in other browsers. function sortTableFunction(table, orderFlag) { return function(ev) { if (orderFlag) { if (ev.target.tagName.toLowerCase() == ‘th’) { sortRows(table, ev.path[0].cellIndex); orderFlag = false; ev.preventDefault(); } } }; } Source: Ask Javascript..

Read more

I am trying to use Greasemonkey to change this code to not use ‘world’, but to use window.location.href so that when the drop down option is selected, it stays on the same page but just changes the suid. Page code: <script type="text/javascript"> $(‘#charselectdropdown’).on(‘select2:select’, function (e) { var data = e.params.data; if(data.id > 0) { window.location ..

Read more

I have pasted the following code in the console to try to import jQuery: var jq = document.createElement("script"); jq.src = "http://code.jquery.com/jquery-3.6.0.min.js"; document.getElementsByTagName("head")[0].appendChild(jq); However this output is shown: Loading failed for the <script> with source "http://code.jquery.com/jquery-3.6.0.min.js". Content Security Policy: The page’s settings blocked the loading of a resource at http://code.jquery.com/jquery-3.6.0.min.js ("script-src"). It would seem that I ..

Read more

I can’t use indexedDB in firefox. This prevents users to login and signup. This code works in every other browsers: static createDB() { const request = indexedDB.open(DB_NAME, 1); request.onupgradeneeded = (e: IDBVersionChangeEvent) => { const db = e.target[“result”]; return db.createObjectStore(MY_STORE, { autoIncrement: true }); }; } How to make sure the db is properly created ..

Read more