We love improvements to our tools! EDGI has general guidelines for contributing and a code of conduct for all of our organizational repos.
In contrast to earlier instructions, we no longer encourage collaborators to publish their own forks to the Google Chrome Store. Instead, please just be sure to co-ordinate with EDGI before the event, so we know you will be pushing seeds to our spreadsheet, and to request read access to the results if you don't already have it. On the other hand, we would still love to have your help improving this extension!
-
Download or Clone this repo: https://github.com/CivicTechTO/presidential-harvest-nomination-tool
-
In Google Chrome Menu ->
Settings
->Extensions
, enable Developer Mode -
Choose the folder containing the extension files, and click
Select
The extension sends the form information to a Google Form, which saves responses to a Google spreadsheet. The extension's form is in popup.html
, while the variables mapping our form elements to the Google Form are in popup.js
. content.js
and event.js
work together to retrieve the title and URL of the page loaded in the current browser tab. src/lib/
contains a copy of jquery, which we use for some basic plumbing.
If for some reason you desperately want to fork the tool, you can do so this way:
-
Create your own Google Form. You can copy ours, or create your own from scratch
- Once you've created a form, Google will automagically create a spreadsheet to store the responses. You can also use the fancy response visualization tool to get some basic information about submissions.
- Make note of the form URL. In
popup.js
, update theGOOGLE_FORMS_URL
variable with the new URL, taking care to replace the finaledit
with/formResponse
.
The line you're looking for looks like this:
const GOOGLE_FORMS_URL = 'https://docs.google.com/forms/d/1kuwxu2lXYSRpkwBj4o9kwjURZL3hgk-mSFoK4qkC4ZI/formResponse';
-
For each field name, you will have to identify the corresponding field entry id and update the various field-related variables. In your browser's developer tools pane,
inspect element
on the input field. You should seeentry.[integer]
in the highlighted code. That is the value for the entry field ID. -
The first time a user nominates a seed, they will choose a government agency, subagency, organization, and possibly suborganization. Subsequent nominations will default to these same values.
-
If you're modifying this extension for non-environment-related event, you will probably want to imitate or extend the EDGI agency taxonomy. Contact us for more information, and/or read our agency primers, which you will want to modify.
Contact us for further information!