Greasy Fork

CSRF Grabber

A library for getting the current csrf token for POSTs on Kickass Torrents.

目前为 2016-05-07 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/19500/124348/CSRF%20Grabber.js

// ==UserScript==
// @name         CSRF Grabber
// @namespace    PXgamer
// @version      0.1
// @description  A library for getting the current csrf token for POSTs on Kickass Torrents.
// @author       PXgamer
// @match        *kat.cr*
// @grant        none
// ==/UserScript==

function csrf() {
    'use strict';

    return $('form input[name="csrf_token"]').val();
}