Project

General

Profile

« Previous | Next » 

Revision c12b9ee3

Added by koszko about 2 years ago

disable payload injection on non-html pages

View differences:

html/display-panel.js
230 230
const view_payload_but = by_id("view_payload");
231 231
const view_injected_but = by_id("view_injected");
232 232
const container_for_injected = by_id("container_for_injected");
233
const content_type_cell = by_id("content_type");
233 234

  
234 235
const queried_items = new Map();
235 236

  
......
275 276
	template.script_contents.textContent = data;
276 277
	container_for_injected.appendChild(template.div);
277 278
    }
279
    if (type === "content_type") {
280
	if (!/html/.test(data))
281
	    content_type_cell.classList.remove("hide");
282
    }
278 283
    if (type === "repo_query_action") {
279 284
	const key = data.prefix + data.item;
280 285
	const results = queried_items.get(key) || {};

Also available in: Unified diff