Asana subtask auto loadmore

Asana subtask auto load more

目前为 2020-03-28 提交的版本。查看 最新版本

// ==UserScript==
// @name         Asana subtask auto loadmore
// @namespace    http://tampermonkey.net
// @description  Asana subtask auto load more
// @version      0.1
// @author       zhong666
// @match        https://app.asana.com/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  function dispatchClickLoadMore() {
    const $loadmore = document.querySelector('.SubtaskGrid.SingleTaskPaneSpreadsheet-subtaskGrid a.SubtaskGrid-loadMore')
    if (!$loadmore) {
      return
    }
    $loadmore.click()
  }

  const mobs = new MutationObserver((mutations) => {
    mutations.forEach(() => {
      dispatchClickLoadMore()
    })
  })

  const $app = document.getElementById('asana_full_page')
  if (!$app) return
  mobs.observe($app, {
    subtree: true,
    childList: true,
  })
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址