我使用videolightbox工具创建了一个视频库。它已生成查询以使其工作。我不知道任何脚本。
我只想突出显示页面中的活动链接,并更改页面中所选链接的颜色。我确定可以做到。
还有办法将页面上的访问链接标记为外部txt文件吗?因此,当第二天加载页面时,我仍然可以将访问过的链接高亮显示。 希望它也可以做到。
jQuery(function () {
var $ = jQuery;
var swfID = "video_overlay";
if (!document.getElementById("vcontainer")) {
$("body").append($("<div id='voverlay'></div>"));
$("#voverlay").append($("<div id = 'vcontainer'></div>"));
}
$("#videogallery a[rel]").overlay({
api: true,
expose: 0.7 ? {
color: "#55aaff",
loadSpeed: 400,
opacity: 0.7
} : null,
onClose: function () {
swfobject.removeSWF(swfID);
},
onBeforeLoad: function () {
var c = document.getElementById(swfID);
if (!c) {
var d = $("<div></div>");
d.attr({
id: swfID
});
$("#vcontainer").append(d);
}
var wmkText = "VideoLightBox";
var wmkLink = "http://videolightbox.com";
c = wmkText ? $("<div></div>") : 0;
if (c) {
c.css({
position: "absolute",
right: "38px",
top: "38px",
padding: "0 0 0 0"
});
$("#vcontainer").append(c);
}
if (c && document.all) {
var f = $("<iframe src=\"javascript:false\"></iframe>");
f.css({
position: "absolute",
left: 0,
top: 0,
width: "100%",
height: "100%",
filter: "alpha(opacity=0)"
});
f.attr({
scrolling: "no",
framespacing: 0,
border: 0,
frameBorder: "no"
});
c.append(f);
}
var d = c ? $(document.createElement("A")) : c;
if (d) {
d.css({
position: "relative",
display: "block",
'background-color': "#E4EFEB",
color: "#837F80",
'font-family': "Lucida Grande,Arial,Verdana,sans-serif",
'font-size': "11px",
'font-weight': "normal",
'font-style': "normal",
padding: "1px 5px",
opacity: 0.7,
filter: "alpha(opacity=70)",
width: "auto",
height: "auto",
margin: "0 0 0 0",
outline: "none"
});
d.attr({
href: wmkLink
});
d.html(wmkText);
d.bind("contextmenu", function (eventObject) {
return false;
});
c.append(d);
}
var src = this.getTrigger().attr("href");
if (typeof d != "number" && (!c || !c.html || !c.html())) {
return;
}
if (true) {
var this_overlay = this;
window.videolb_complite_event = function () {
this_overlay.close();
};
window.onYouTubePlayerReady = function (playerId) {
var player = $("#" + swfID).get(0);
if (player.addEventListener) {
player.addEventListener("onStateChange", "videolb_YTStateChange");
} else {
player.attachEvent("onStateChange", "videolb_YTStateChange");
}
window.videolb_YTStateChange = function (newState) {
if (!newState) {
this_overlay.close();
}
};
};
}
swfobject.createSWF({
data: src,
width: "100%",
height: "100%",
wmode: "opaque"
}, {
allowScriptAccess: "always",
allowFullScreen: true,
FlashVars: true ? "complete_event=videolb_complite_event()&enablejsapi=1" : ""
}, swfID);
}
});
});