whatnowmax / scroll_to_action_plan

// ==UserScript==
// @name scroll_to_action_plan
// @description scroll_to_action_plan
// @version 0.1
// @author whatnowmax
// @license MIT
// @match https://crm.stagrp.com/index.php?action=DetailView&module=Cases&record=*
// @match https://crm.stagrp.com/index.php?module=Cases*

// @run-at document-end
// @grant none
// ==/UserScript==

// @run-at document-end
// @grant none
// ==/UserScript==

    //make button
    var _btnScroll = document.createElement("BUTTON");
    //set button title
    var buttonTitle = document.createTextNode("Action Plan");
    _btnScroll.appendChild(buttonTitle);

    _btnScroll.target = "_blank";




    _btnScroll.onclick = scroll_to_casenotes;
    document.getElementById("case_number").appendChild(_btnScroll);


function scroll_to_casenotes() {
      document.getElementById("dtbc_business_impact_c").scrollIntoView(true);
}