summary refs log tree commit diff
path: root/src/librustdoc/html/static/main.js
AgeCommit message (Collapse)AuthorLines
2020-07-10rustdoc: Fix doc aliases with crate filteringOliver Middleton-6/+7
Fix a crash when searching for an alias contained in the currently selected filter crate. Also remove alias search results for crates that should be filtered out. The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
2020-05-31Rollup merge of #72691 - GuillaumeGomez:escape-key-handling, r=kinnisonDylan DPC-4/+12
Fix escape key handling Fixes #72647. The problem was that you could have a timeout just after the moment you press "escape", putting back the results. r? @kinnison
2020-05-31Put input timeout clearance inside a functionGuillaume Gomez-13/+11
2020-05-28Fix escape key handlingGuillaume Gomez-3/+13
2020-05-26Improve formattingGuillaume Gomez-2/+2
2020-05-26Fix eslint lintsGuillaume Gomez-31/+23
2020-05-26Reexported functions are now declared directly as "windows" fieldGuillaume Gomez-11/+6
2020-05-26Move "global" code into anonymous functionsGuillaume Gomez-248/+258
2020-05-26Move focusSearchBar and defocusSearchBar functions to the top of the file ↵Guillaume Gomez-10/+11
with other functions
2020-05-21Rollup merge of #72272 - ↵Ralf Jung-0/+6
GuillaumeGomez:fix-back-on-page-with-search-behaviour, r=kinnison Fix going back in history to a search result page on firefox This bug was actually firefox not re-running JS script when you go back in history. To trigger it on the current docs: * Make a search * Pick an element (which isn't on the same page as the current element!) * Go back in history Instead of having the search results, you'll see the normal doc page. You can find a small explanation about it [here](http://web.archive.org/web/20100428053932/http://www.firefoxanswer.com/firefox/672-firefoxanswer.html). r? @kinnison cc @ollie27
2020-05-19Fix going back in history to a search result page on firefoxGuillaume Gomez-0/+6
2020-05-14* Update aliases data struct from HashMap to BTreeMap to have more ↵Guillaume Gomez-3/+4
deterministic results * Update Javascript to take this change into account * Update CrateData::aliases field to take a reference instead (it allowed to remove a conversion loop)
2020-05-14Make current crate aliases go firstGuillaume Gomez-6/+14
2020-05-14Move doc alias discovery into the Attributes struct and some code improvementsGuillaume Gomez-1/+1
2020-05-07Merge aliases and search-indexGuillaume Gomez-39/+87
2020-05-07Improve doc alias JS codeGuillaume Gomez-23/+50
2020-05-05Replace title "Methods" with "Implementations"Guillaume Gomez-1/+1
2020-03-16Update src/librustdoc/html/static/main.js Guillaume Gomez-1/+1
Fix variable name Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-16formattingGuillaume Gomez-6/+4
2020-03-16Support type search for arguments and returned typesGuillaume Gomez-62/+66
2020-02-27Remove "important traits" featureGuillaume Gomez-28/+0
2020-02-15Auto merge of #68668 - GuillaumeGomez:struct-variant-field-search, r=ollie27bors-8/+22
Struct variant field search Fixes #16017. Reopening of #64724. cc @tomjakubowski cc @ollie27 r? @kinnison
2020-01-30rustdoc: emit JS paths for struct-like variantsTom Jakubowski-8/+22
On the backend, rustdoc now emits `paths` entries to a crate's search index for struct-like enum variants, and index items of type structfield which belong to such variants point to their variant parents in the `paths` table, rather than their enum grandparents. The path entry for a variant is the fully qualified module path plus the enum name. On the frontend, the search code recognizes structfields belonging to structlike variants in the `paths` table and re-constructs the URL to the field's anchor on the enum documentation page. closes #16017
2020-01-28Fix null synthetic_implementors errorGuillaume Gomez-14/+16
2020-01-20Remove usage of global variable "inlined_types"Guillaume Gomez-2/+18
2020-01-12rustdoc: HTML escape arrows on help popupOliver Middleton-2/+2
2019-12-22Fix invalid results showing backGuillaume Gomez-0/+4
2019-12-22Improve code readabilityGuillaume Gomez-43/+37
2019-12-22Improve JS code a bit by avoid erasing all event handlersGuillaume Gomez-4/+5
2019-12-15Fix JS error when loading page with searchGuillaume Gomez-1/+1
2019-12-02Add missing checkGuillaume Gomez-1/+1
2019-11-20Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnisonMazdak Farrokhzad-15/+10
Fix selected crate search filter Fixes #62929. r? @kinnison
2019-11-20Rollup merge of #66298 - Ppjet6:disable-search-field, r=GuillaumeGomezMazdak Farrokhzad-4/+4
rustdoc: fixes #64305: disable search field instead of hidding it The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all. @GuillaumeGomez Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20rustdoc: fixes #64305: disable search field instead of hidding itMaxime “pep” Buquet-4/+4
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-19Rollup merge of #66430 - dns2utf8:fix_code_selection_click_handler, ↵Mazdak Farrokhzad-24/+37
r=GuillaumeGomez [doc] Fix the source code highlighting on source comments The code would always forget the previous selection. r? @GuillaumeGomez
2019-11-18Fix selected crate search filterGuillaume Gomez-15/+10
2019-11-15Prevent jumps when selecting one or many linesStefan Schindler-0/+5
2019-11-15Fix the source code highlighting on source commentsStefan Schindler-24/+32
2019-11-15Code cleanup to remove douplacte var definitionStefan Schindler-3/+2
Also move the declaration outside the loop since they accumulate state with each iteration
2019-11-15Remove unused argumentStefan Schindler-1/+1
2019-11-08Rollup merge of #66123 - GuillaumeGomez:no-more-hidden-elements, r=Dylan-DPCYuki Okushi-11/+51
No more hidden elements Fixes #66046. Follow-up of #66082. r? @kinnison
2019-11-07Rollup merge of #64696 - GuillaumeGomez:rustdoc-sub-settings, r=kinnisonMazdak Farrokhzad-4/+28
[rustdoc] add sub settings This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page. ![Screenshot from 2019-09-23 00-46-14](https://user-images.githubusercontent.com/3050060/65395521-15aff300-dd9c-11e9-9437-429ca347d455.png) r? @Mark-Simulacrum
2019-11-07Only call onHashChange instead of both functionsGuillaume Gomez-3/+2
2019-11-07Remove old isHidden functionGuillaume Gomez-1/+1
2019-11-06When a URL hash refers to a hidden element, it makes the element visibleGuillaume Gomez-10/+51
2019-11-04clean highlightSourceLines codeGuillaume Gomez-42/+54
2019-11-03Auto merge of #65780 - GuillaumeGomez:move-help-popup-generation-code, ↵bors-2/+49
r=Mark-Simulacrum Move help popup generation code The first commit is just a small cleanup. The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead. r? @kinnison
2019-10-29Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPCTyler Mandry-3/+7
Prevent help popup to disappear when clicking on it Fixes #65736. r? @kinnison
2019-10-29add sub settings in rustdocGuillaume Gomez-4/+28
2019-10-27reduce size of generated HTML files by moving the popup helper code to the JSGuillaume Gomez-0/+47