-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 事件不起作用 #441
Comments
已解决: (async function() {
})(); // // 确保 items 变量可用,并且包含条目 // // 遍历所有选中的条目 // // 转换为小写,以便进行不区分大小写的比较 // // 检查 publicationTitle 是否有效 |
Is there an existing issue for this?
Are you using the latest Zotero and the latest plugin?
Environment
Describe the bug
我使用的一些代码,为什么在一些事件下不能自动执行呢?比如下面的代码,我希望在新建条目的时候自动执行,但是不可以,只能自己手动:
// 确保 items 变量可用,并且包含条目
if (items?.length > 0) {
// 定义 publicationTitle 与缩写的映射(不区分大小写)
const titleToAbbreviation = {
"academy of management journal": "AMJ",
"journal of advertising": "JA",
"journal of marketing": "JMar",
"journal of consumer psychology": "JCP",
"information systems research": "ISR",
"journal of consumer research": "JCR",
"journal of management": "JMan",
"journal of marketing research": "JMR",
"journal of the academy of marketing science": "JAMS",
"management science": "ManS",
"marketing science": "MarS",
"annual review of psychology": "ARP",
"international journal of information management": "IJIM",
"academy of management review": "AMR",
"psychological bulletin": "PB",
"american economic review": "AER",
"journal of financial economics": "JFE",
"journal of product innovation management": "JPIM",
"annual review of sociology": "ARS",
"journal of service research": "JSR",
"annals of tourism research": "ATR",
"journal of retailing": "JR",
"journal of travel research": "JTR",
"tourism management": "TM",
"journal of political economy": "JPE",
"production and operations management": "POM",
"journal of economic perspectives": "JEP",
"journal of personality and social psychology": "JPSP",
"international journal of research in marketing": "IJRM",
"journal of management information systems": "JMIS",
"psychological review": "PR",
"organization science": "OS",
"psychological science": "PS",
"organizational behavior and human decision processes": "OBHFP",
"current directions in psychological science": "CDPS",
"mis quarterly": "MIS",
};
// 遍历所有选中的条目
items.forEach(item => {
// 获取条目的 "publicationTitle" 字段
const publicationTitle = item.getField('publicationTitle');
});
}
Debug Output
report.txt
Anything else?
No response
The text was updated successfully, but these errors were encountered: