Skip to content

Commit

Permalink
Move cookie stack trace extraction to the devtools. (duckduckgo#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth authored Aug 31, 2023
1 parent 21b1b0c commit d138f34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shared/js/devtools/panel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getStackTraceOrigins } from '@duckduckgo/content-scope-scripts/src/utils'
const table = document.querySelector('#request-table')
const clearButton = document.getElementById('clear')
const refreshButton = document.getElementById('refresh')
Expand Down Expand Up @@ -197,7 +198,8 @@ const actionHandlers = {
addRequestRow(row)
},
jscookie: (m) => {
const { documentUrl, action, reason, value, stack, scriptOrigins } = m.message
const { documentUrl, action, reason, value, stack } = m.message
const scriptOrigins = [...getStackTraceOrigins(stack)]
const row = document.getElementById('cookie-row').content.firstElementChild.cloneNode(true)
const cells = row.querySelectorAll('td')
cells[1].textContent = documentUrl
Expand Down

0 comments on commit d138f34

Please sign in to comment.