Title: [220280] trunk/Websites/webkit.org
- Revision
- 220280
- Author
- j...@apple.com
- Date
- 2017-08-04 11:32:09 -0700 (Fri, 04 Aug 2017)
Log Message
Fixed loading feature status page queries and anchor link URLs
https://bugs.webkit.org/show_bug.cgi?id=175156
Reviewed by Simon Fraser.
* wp-content/themes/webkit/status.php:
Modified Paths
Diff
Modified: trunk/Websites/webkit.org/ChangeLog (220279 => 220280)
--- trunk/Websites/webkit.org/ChangeLog 2017-08-04 18:28:23 UTC (rev 220279)
+++ trunk/Websites/webkit.org/ChangeLog 2017-08-04 18:32:09 UTC (rev 220280)
@@ -1,3 +1,12 @@
+2017-08-04 Jon Davis <j...@apple.com>
+
+ Fixed loading feature status page queries and anchor link URLs
+ https://bugs.webkit.org/show_bug.cgi?id=175156
+
+ Reviewed by Simon Fraser.
+
+ * wp-content/themes/webkit/status.php:
+
2017-07-26 Frederic Wang <fw...@igalia.com>
Unreviewed, minor adjustments to the previous demo.
Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/status.php (220279 => 220280)
--- trunk/Websites/webkit.org/wp-content/themes/webkit/status.php 2017-08-04 18:28:23 UTC (rev 220279)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/status.php 2017-08-04 18:32:09 UTC (rev 220280)
@@ -744,6 +744,11 @@
} else filtersForm.className += " opened";
});
+ var searchTerm = searchTermFromURL();
+ if (searchTerm.length) {
+ inputField.value = searchTerm;
+ inputField.placeholder = '';
+ }
inputField.addEventListener('input', function() { updateSearch(featuresArray); });
@@ -817,6 +822,18 @@
return visibleCount;
}
+ function searchTermFromURL()
+ {
+ var search = window.location.search;
+ var searchRegExp = /\#.*search=([^&]+)/;
+
+ var result;
+ if (result = window.location.href.match(searchRegExp))
+ return decodeURIComponent(result[1]);
+
+ return '';
+ }
+
function isSearchMatch(feature, searchTerm)
{
if (feature.name.toLowerCase().indexOf(searchTerm) !== -1)
@@ -907,7 +924,7 @@
updateSearch(everythingToShow);
- if (window.location.hash) {
+ if (window.location.hash.length) {
var hash = window.location.hash;
window.location.hash = ""; // Change hash so navigation takes place
window.location.hash = hash;
@@ -950,9 +967,12 @@
appendDelimiter();
searchString += 'status=' + activeStatusFilters.join(',');
}
+
+ if (searchString.length) {
+ var current = window.location.href;
+ window.location.href = "" '') + '#' + searchString;
+ }
- var current = window.location.href;
- window.location.href = "" '') + '#' + searchString;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes