- Implemented popup.html for user interface with search functionality and request display. - Developed popup.js to manage search items, matched requests, and clipboard operations. - Created mergeConflictManager.js for automated git operations in specified repositories. - Added projects.txt to maintain a list of relevant projects. - Introduced pushReleaseBranches.js for managing release branches across multiple projects. - Developed releasePrepper.js to prepare projects for release with branch management. - Created stashUpdater.js to update git origins for projects. - Added updatedProjects.txt to track projects that have been updated.
9.8 KiB
Gregs Memory Palace
This project contains several files that perform various tasks to make my life easier. This README is maintained by one of the functions in here and ran on a pre-commit hook. Any new files added in utils make sure there are comments so this file can be as useful as possible.
File Summary
apiResponseChecker.js
This file contains a script that fetches data from an API and writes it to a file. The script makes multiple API calls at regular intervals for a specified duration. The fetched data is appended to separate files based on the data center, user tier, and security symbol. The script uses Axios for making HTTP requests and the fs module for file operations.
The script exports a function fetchAndWriteApiData that takes an object with the following properties:
- url: The URL of the API endpoint to fetch data from.
- headers: An object containing the headers to be sent with the request.
- dataCenter: The data center to which the API request should be made.
- userTier: The user tier for which the API request should be made.
- xid: The xid of the security for which the API request should be made.
- symbol: The symbol of the security for which the API request should be made.
The script also schedules the API calls to be made every 2 minutes for a duration of 4 hours. The start time and stop time are logged to the console.
bookmarkletMaker.js
This script generates a bookmarklet from a JavaScript file. It reads the JavaScript file, removes any multiline comments, and creates a bookmarklet string. The bookmarklet can then be used to execute the JavaScript code in a browser.
Use this to generate a bookmarklet from a JavaScript file in the utils/bookmarklets directory.
@param {string} filePath - The path to the JavaScript file. @returns {string} The generated bookmarklet.
apiDocs.js
Opens the API documentation for a given project API.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
@param {string} projectAPI - The project API to open the documentation for.
bmo-gam-auth.js
BMO GAM Authentication Bookmarklet Checks localStorage for BMO GAM authentication keys (bmo.gam.auth.consumerKey and bmo.gam.auth.consumerSecret). If they don't exist, modifies the current URL to include the authentication parameters and reloads the page.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
dag.js
Opens the DAG Task details page(s) based on user input. If user provides a comma-separated list of DAG Task numbers, it opens each task's details page in a new tab. If user does not provide any input, it opens the default DAG Tasks page in a new tab.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
hashid.js
This JavaScript function takes a string, decodes it using decodeURIComponent, alerts the decoded string, and copies the result to the clipboard.
The function works as follows:
- Takes a string as input.
- Decodes the string using decodeURIComponent.
- Alerts the decoded string.
- Copies the decoded string to the clipboard.
Note: This function uses the Clipboard API which might not be fully supported in all browsers.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
jira.js
This JavaScript function is a bookmarklet that prompts the user for a JIRA ticket number and then opens a new browser tab with the corresponding JIRA page for that ticket.
The function works as follows:
- Prompts the user to enter a JIRA ticket number. The entered value is stored in the
answervariable. - Sets a default URL to the JIRA dashboard.
- Checks if the user entered a value in the prompt.
- If the user entered a value, changes the URL to point to the specific JIRA page for the entered ticket number.
- Opens the URL in a new browser tab and brings focus to it.
Note: This function is wrapped in a self-invoking function (function() {...})(); which means it will automatically execute as soon as it is defined.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
moids.js
This JavaScript function is a bookmarklet that prompts the user for multiple MOID (Markit On Demand) numbers and then opens a new browser tab for each corresponding Jira page for those MOIDs.
The function works as follows:
- Prompts the user to enter MOID numbers separated by commas. The entered values are stored in the
answersarray. - Sets a default URL to the Jira dashboard.
- Checks if the user entered any values in the prompt.
- If the user entered values, changes the URL to point to the specific Jira page for each entered MOID number.
- Opens each URL in a new browser tab and brings focus to the last opened tab.
Note: This function is wrapped in a self-invoking function (function() {...})(); which means it will automatically execute as soon as it is defined.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
jsToMsDate.js
No Description Provided
msToJsDate.js
No Description Provided
showDebugInfo.js
No Description Provided
openNomad
No Description Provided
rbc-di-featureflags.js
This function creates a modal dialog that allows the user to toggle feature flags. It retrieves the feature flags from the session storage, creates checkboxes for each flag, and saves the updated flags back to the session storage when the user clicks the save button. The modal dialog is appended to the document body and can be closed by clicking the save button.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
rbc-di-featureflags.md
No Description Provided
rbcSessionStorage.js
Deletes the 'fnc-rbc-session' property from the session storage if it exists. If the property exists, it prompts the user for confirmation before deleting. If the property does not exist, it displays an alert message.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
rbcSiteNavigator.js
Opens a specific URL based on the provided environment and language. Prompts the user to enter the environment and language in the format 'prod|ste,en|fr'. If the input is valid, it opens the corresponding URL in a new tab. If the input is invalid, it logs an error message to the console.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
rbcWatchlistPopulator.js
This code is a bookmarklet that populates a watchlist on a web page. It defines an array of new securities and a function called populateWatchlist. The function finds the input field on the page, iterates over the new securities array, and sets the value of the input field to each security in the array. It then triggers events to simulate user input and key presses to add the security to the watchlist. The process repeats for each security in the array with a delay of 2.5 seconds between each iteration. The code is executed when the bookmarklet is clicked on the web page.
Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
tokenGrabber.js
Grabs the user session token from the 'fnc-rbc-session' session storage and copies it to the clipboard.
workspace.js
No Description Provided
background.js
No Description Provided
icon128.png
No Description Provided
icon16.png
No Description Provided
icon48.png
No Description Provided
manifest.json
No Description Provided
popup.css
No Description Provided
popup.html
No Description Provided
popup.js
No Description Provided
README.md
No Description Provided
chrome-network-monitor.zip
No Description Provided
updateReadme.js
This file is responsible for updating the README file with file links and descriptions. It reads the files in the specified directory, extracts their descriptions, and generates markdown links for each file. Then, it updates the README file with the generated links and descriptions.
mergeConflictManager.js
No Description Provided
projects.txt
No Description Provided
pushReleaseBranches.js
Recursively search for a project folder by name starting from basePath
releasePrepper.js
Promisify readline question
stashUpdater.js
No Description Provided
updatedProjects.txt
No Description Provided