mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Filter duplicated plugins in falkon:config page
Also show plugin filename
This commit is contained in:
parent
e6edae7d63
commit
d20d491e52
@ -23,13 +23,15 @@ table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2p
|
||||
<script type="text/javascript">
|
||||
function addPlugins() {
|
||||
var table = document.getElementById('npapi-plugins');
|
||||
for(var i = 0; i < navigator.plugins.length; i++) {
|
||||
var existing = {};
|
||||
for (var i = 0; i < navigator.plugins.length; i++) {
|
||||
var plugin = navigator.plugins[i];
|
||||
if (plugin.name == '') {
|
||||
if (plugin.name == '' || existing[plugin.filename]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
table.innerHTML += "<tr><td>" + plugin.name + "</td><td colspan=3>" + plugin.description + "</td></tr>";
|
||||
existing[plugin.filename] = true;
|
||||
table.innerHTML += "<tr><td>" + plugin.name + "</td><td colspan=3>"
|
||||
+ plugin.description + " (" + plugin.filename + ")</td></tr>";
|
||||
}
|
||||
}
|
||||
window.addEventListener("load", addPlugins, false);
|
||||
|
Loading…
Reference in New Issue
Block a user