LeetCode有答题新界面了,写数据库再也不用苦恼了。
打开LeetCode官网
1、F12打开检查,也可以右键检查
2、点击Console(控制台)
3、输入以下代码回车
fetch('https://leetcode.cn/graphql/noj-go', {
headers: {
accept: '*/*',
'accept-language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7',
'content-type': 'application/json',
},
referrer: location.href,
body: JSON.stringify({
operationName: 'setQdToBeta',
variables: {},
query: /* GraphQL */ `
mutation setQdToBeta {
authenticationSetBetaParticipation(
participationType: NEW_QUESTION_DETAIL_PAGE
optedIn: true
) {
inBeta
hitBeta
__typename
}
}
`,
}),
method: 'POST',
mode: 'cors',
credentials: 'include',
})
4、刷新网页就可以了
快去试试吧!
注:上述代码来自:https://leetcode.cn/circle/discuss/tZ3kgV/