Farbwechsler im Firefox!
This commit is contained in:
parent
1be08f3ca6
commit
c46f2dd8e7
|
@ -1,3 +1,5 @@
|
||||||
|
var style;
|
||||||
|
|
||||||
function switch_style(s) {
|
function switch_style(s) {
|
||||||
var el = document.getElementsByTagName("link")
|
var el = document.getElementsByTagName("link")
|
||||||
for (var i = 0; i < el.length; i++ ) {
|
for (var i = 0; i < el.length; i++ ) {
|
||||||
|
@ -29,12 +31,15 @@ var w = window.innerWidth - offset.left,
|
||||||
h = window.innerHeight - offset.top - 1
|
h = window.innerHeight - offset.top - 1
|
||||||
|
|
||||||
function next_style() {
|
function next_style() {
|
||||||
var s = d3.select("head link[title]:not([disabled]) * link[title]")
|
var s;
|
||||||
|
if (style !== undefined)
|
||||||
|
s = d3.select("head link[title=" + style + "] + link")
|
||||||
|
|
||||||
if (s[0][0] == null)
|
if (s == null || s[0][0] == null)
|
||||||
s = d3.select("head link[title][disabled]")
|
s = d3.select("head link[title]")
|
||||||
|
|
||||||
switch_style(s[0][0].getAttribute("title"))
|
style = s[0][0].getAttribute("title")
|
||||||
|
switch_style(style)
|
||||||
}
|
}
|
||||||
|
|
||||||
var cp = d3.select("header").append("div")
|
var cp = d3.select("header").append("div")
|
||||||
|
|
Loading…
Reference in a new issue