Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map-link prefers-map-content media feature support #68

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ chrome.runtime.onInstalled.addListener(async () => {
featureIndexOverlayOption: false,
renderMap: true,
defaultExtCoor: 'pcrs',
defaultLocCoor: 'gcrs'
defaultLocCoor: 'gcrs',
defaultContentPreference: 'no-preference'
}
});
registerContentScripts();
Expand Down
16 changes: 16 additions & 0 deletions src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ <h6 class="card-title">Accessibility Settings</h6>

</div>
</div>
<div class="card">
<div class="card-body">
<h6 class="card-title">Content Preferences</h6>
<div>
<label class="form-label" for="content-prefs">Preferred map content type: </label>
<select class="form-select form-select-sm" id="contentPreference">
<option value="no-preference" selected>No preference (default)</option>
<option value="image">Images</option>
<option value="tiled-image">Tiled images</option>
<option value="feature">Features</option>
<option value="vector-tile">Vector tiles</option>
<option value="table">Tables</option>
</select>
</div>
</div>
</div>


</div>
Expand Down
4 changes: 3 additions & 1 deletion src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function loadOptions() {
featureIndexOverlayOption: false,
renderMap: false,
defaultExtCoor: 'pcrs',
defaultLocCoor: 'gcrs'
defaultLocCoor: 'gcrs',
defaultContentPreference: 'no-preference'
};
for (let name in options) {
let elem = document.getElementById(name);
Expand Down Expand Up @@ -71,5 +72,6 @@ document.addEventListener("DOMContentLoaded", () => {
document.getElementById("renderMap").addEventListener("change", handleCheckboxChange);
document.getElementById("defaultExtCoor").addEventListener("change", handleDropdownChange);
document.getElementById("defaultLocCoor").addEventListener("change", handleDropdownChange);
document.getElementById('contentPreference').addEventListener("change", handleDropdownChange);
});

Loading