.get() if (document.getElementById('cr1').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight == 5 || d.weight == 4) { if (document.getElementById('cr3').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
test("should check item to list", () => { const { getByPlaceholderText, getByLabelText } = render(<Todos />); const todosEntryNode = getByPlaceholderText("Add todo...") enterValueAndPressEnter(todosEntryNode, "Learn to test") enterValueAndPressEnter(todosEntryNode, "Practice") enterValueAndPressEnter(todosEntryNode, "Keep trying") const practiceNode = getByLabelText("Practice") fireEvent.click(practiceNode) expect(getByLabelText("Learn to test").checked).toBe(false) expect(practiceNode.checked).toBe(true) expect(getByLabelText("Keep trying").checked).toBe(false) });
document.getElementById('save').addEventListener('click', function() { var color = document.getElementById('color').value; var showImage = document.getElementById('show_image').checked; // 这里貌似会存在刷新不及时的问题 chrome.extension.getBackgroundPage().showImage = showImage; // 让background即使生效 chrome.storage.sync.set({color: color, showImage: showImage}, function() { // 注意新版的options页面alert不生效! // alert('保存成功!'); document.getElementById('status').textContent = '保存成功!'; setTimeout(() => {document.getElementById('status').textContent = '';}, 800); }); });
const toggleImageloadingbars = (change) => { imageloadingbarsEnabled = imageloadingbarsSetting.checked; console.log('toggling video/audio imageloadingbarsing', imageloadingbarsEnabled); setLocalStorage('imageloadingbars', imageloadingbarsEnabled); }
function bindToggleVisibilityToNote(note) { const toggleCheckbox = document.getElementById(`visible-to-all-${note._id}`); toggleCheckbox.addEventListener('change', () => { toggleVisibility(note._id, toggleCheckbox.checked); }); }
function checkBoxChange(){ var checkSpan = document.getElementById("checkSpan"); var checkBox = document.getElementById("checkBox"); checkSpan.innerHTML = checkBox.checked ? "You Checked !!!" : "Click On Check !"; }
test("should add items to list", () => { const { getByPlaceholderText, getByLabelText } = render(<Todos />); const todosEntryNode = getByPlaceholderText("Add todo...") enterValueAndPressEnter(todosEntryNode, "Learn to test") enterValueAndPressEnter(todosEntryNode, "Practice") enterValueAndPressEnter(todosEntryNode, "Keep trying") expect(getByLabelText("Learn to test").checked).toBe(false) expect(getByLabelText("Practice").checked).toBe(false) expect(getByLabelText("Keep trying").checked).toBe(false) });
.get() if (document.getElementById('cr1').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight === 5 || d.weight === 4) { if (document.getElementById('cr3').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
.get() if (document.getElementById('cr1').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4) { if (document.getElementById('cr3').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
.get() if (document.getElementById('cr1').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight == 5 || d.weight == 4) { if (document.getElementById('cr3').checked) { d3.csv('linksBE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
.get() if (document.getElementById('cr1').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4) { if (document.getElementById('cr3').checked) { d3.csv('linksFE.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
.get() if (document.getElementById('cr1').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight > 0) { if (document.getElementById('cr2').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight === 5 || d.weight === 4) { if (document.getElementById('cr3').checked) { d3.csv('linksFS.csv').row(function (d) { if (d.weight === 5 || d.weight === 4 || d.weight === 3 || d.weight === 2) {
const toggleLoop = (change) => { loopEnabled = loopSetting.checked; console.log('toggling video/audio looping', loopEnabled); setLocalStorage('loop', loopEnabled); }