如何修复此脚本以将值从 true 更改为 false

How to fix this script to change the value from true to false

这是我在你们论坛上的第一个问题,我希望找到答案,也许这对你们每个人来说都是一个愚蠢的问题,但我从 JavaScript 训练营开始,我是好奇如何使用 TamperMonkey

更改突出显示的值

另一个小问题:是否有任何用于 TamperMonkey 的宏记录器,例如 Microsoft Office 产品中提供的用于记录 VB 宏然后稍后编辑的宏记录器?

HTML

<html class=" video videoautoplay">
    <body data-no-turbolink="true">
    <meta content="width=device-width,initial-scale=1.0,user-scalable=no" 
    name="viewport">
    <meta id="fedora-keys" data-commit 
    sha="f232f03c4db92d93cff3bee17185864b56d67336" data-env="production"

TamperMonkey 脚本

(function() {
  'use strict';
   var link = document.createElement('meta');
   link.setAttribute('name', 'data-env');
   link.content = "development";
   document.getElementsByTagName('head')[0].appendChild(link);
})();

我正在尝试使用 TamperMonkey 将 "production" 更改为 "development",但我怪我对编程语言的无知。

此致

尝试以下方法直接更改元素:

(function() {
   'use strict';
   //get the meta element with id fedora-keys
   var link = document.querySelector('meta#fedora-keys'); 
   //set the data-env attribute to development
   link.setAttribute('data-env', 'development');
})();
document.getElementById('fedora-keys')
        .setAttribute('data-env', 'development')

Is there any macro recorder for TamperMonkey, like the one provided in Microsoft Office products to record a VB macro then edit it later?

我认为 TamperMonkey 不支持:

provides features like a clear overview over the running scripts, a built-in editor, ZIP-based import and export, automatic update checks and browser and cloud storage based synchronization.