xxxxxxxxxx
// paste code into your console.
var cover = document.createElement("div");
let css = `
position: fixed;
pointer-events: none;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: white;
mix-blend-mode: difference;
z-index: 1;
`
cover.setAttribute("style", css);
document.body.appendChild(cover);
xxxxxxxxxx
function toggle() {
let q = document.querySelectorAll('#nightify')
if(q.length) {
q[0].parentNode.removeChild(q[0])
return false
}
var h = document.getElementsByTagName('head')[0],
s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.setAttribute('id', 'nightify');
s.appendChild(document.createTextNode('html{-webkit-filter:invert(100%) hue-rotate(180deg) contrast(70%) !important; background: #fff;} .line-content {background-color: #fefefe;}'));
h.appendChild(s);
return true
}
toggle()
xxxxxxxxxx
$entity_type = 'paragraph';
$field_name = 'field_your_field_name';
$old_value = 'old value';
$new_value = 'new value';
$database = \Drupal::database();
$database->update("{$entity_type}__{$field_name}")
->fields([
'field_graphic_value' => $new_value,
])
->condition('field_graphic_value', $old_value)
->execute();