Code enforcement search link - hcpao.org

5/30/2023, 22:56:47 PM

Detta skript bör inte installeras direkt. Det är ett bibliotek för andra skript att inkludera med meta-direktivet // @require https://update.greasyfork.org/scripts/467540/1198880/Code%20enforcement%20search%20link%20-%20hcpaoorg.js

  1. // ==UserScript==
  2. // @name Code enforcement search link - hcpao.org
  3. // @namespace Violentmonkey Scripts
  4. // @match *://*.hcpao.org/Search/Parcel/*
  5. // @include *://hcpao.org/Search/Parcel/*
  6. // @grant none
  7. // @version 1.1
  8. // @author Ryan McLean
  9. // @description 5/30/2023, 22:56:47 PM
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. const parcelId = $("title").text().split(" - ")[0];
  14. const linksContainer = $("div.container.body-content").find("div.row:eq(1)").find("div:eq(1)");
  15. const codeEnforcementSearchForm = $(`
  16. <form method="POST" action='http://permits.hcbcc.org/eGovPlus90/property/prop_search_res.aspx' id='codeSearchForm' name='codeSearchForm' target='_blank'>
  17. <input type='hidden' name='parcel_id' value='${parcelId}' />
  18. <input type='hidden' name='owner' value='' />
  19. <input type='hidden' name='house_num' value='' />
  20. <input type='hidden' name='street' value='' />
  21. <input type='hidden' name='prop_srh' value='SEARCH' />
  22. </form>
  23. `)
  24.  
  25. $("body").append(codeEnforcementSearchForm);
  26. const codeEnforcementLink = linksContainer.append(` | `).append(`<a href="#" target="codesearch" onClick="document.forms['codeSearchForm'].submit(); return false;">Code Enforcement Search</a>`);