addons/firefox-addons/tab-mover

annotate COPYING @ 32:aaed574396b8

Move pinned tabs correctly

Pinned tabs need to be handled separately, the must either be moved before or
after other pinned tabs or to index 0. The built-in behavior of the "Move to
New Window" action is to unpin tabs. Follow this behavior for consistency.
Furthermore, active, pinned tabs are not marked as active. Handle this case as
well.
author Guido Berhoerster <guido+tab-mover@berhoerster.name>
date Thu Apr 08 11:22:24 2021 +0200 (20 months ago)
parents
children
rev   line source
guido+tab-mover@0 1 Mozilla Public License Version 2.0
guido+tab-mover@0 2 ==================================
guido+tab-mover@0 3
guido+tab-mover@0 4 1. Definitions
guido+tab-mover@0 5 --------------
guido+tab-mover@0 6
guido+tab-mover@0 7 1.1. "Contributor"
guido+tab-mover@0 8 means each individual or legal entity that creates, contributes to
guido+tab-mover@0 9 the creation of, or owns Covered Software.
guido+tab-mover@0 10
guido+tab-mover@0 11 1.2. "Contributor Version"
guido+tab-mover@0 12 means the combination of the Contributions of others (if any) used
guido+tab-mover@0 13 by a Contributor and that particular Contributor's Contribution.
guido+tab-mover@0 14
guido+tab-mover@0 15 1.3. "Contribution"
guido+tab-mover@0 16 means Covered Software of a particular Contributor.
guido+tab-mover@0 17
guido+tab-mover@0 18 1.4. "Covered Software"
guido+tab-mover@0 19 means Source Code Form to which the initial Contributor has attached
guido+tab-mover@0 20 the notice in Exhibit A, the Executable Form of such Source Code
guido+tab-mover@0 21 Form, and Modifications of such Source Code Form, in each case
guido+tab-mover@0 22 including portions thereof.
guido+tab-mover@0 23
guido+tab-mover@0 24 1.5. "Incompatible With Secondary Licenses"
guido+tab-mover@0 25 means
guido+tab-mover@0 26
guido+tab-mover@0 27 (a) that the initial Contributor has attached the notice described
guido+tab-mover@0 28 in Exhibit B to the Covered Software; or
guido+tab-mover@0 29
guido+tab-mover@0 30 (b) that the Covered Software was made available under the terms of
guido+tab-mover@0 31 version 1.1 or earlier of the License, but not also under the
guido+tab-mover@0 32 terms of a Secondary License.
guido+tab-mover@0 33
guido+tab-mover@0 34 1.6. "Executable Form"
guido+tab-mover@0 35 means any form of the work other than Source Code Form.
guido+tab-mover@0 36
guido+tab-mover@0 37 1.7. "Larger Work"
guido+tab-mover@0 38 means a work that combines Covered Software with other material, in
guido+tab-mover@0 39 a separate file or files, that is not Covered Software.
guido+tab-mover@0 40
guido+tab-mover@0 41 1.8. "License"
guido+tab-mover@0 42 means this document.
guido+tab-mover@0 43
guido+tab-mover@0 44 1.9. "Licensable"
guido+tab-mover@0 45 means having the right to grant, to the maximum extent possible,
guido+tab-mover@0 46 whether at the time of the initial grant or subsequently, any and
guido+tab-mover@0 47 all of the rights conveyed by this License.
guido+tab-mover@0 48
guido+tab-mover@0 49 1.10. "Modifications"
guido+tab-mover@0 50 means any of the following:
guido+tab-mover@0 51
guido+tab-mover@0 52 (a) any file in Source Code Form that results from an addition to,
guido+tab-mover@0 53 deletion from, or modification of the contents of Covered
guido+tab-mover@0 54 Software; or
guido+tab-mover@0 55
guido+tab-mover@0 56 (b) any new file in Source Code Form that contains any Covered
guido+tab-mover@0 57 Software.
guido+tab-mover@0 58
guido+tab-mover@0 59 1.11. "Patent Claims" of a Contributor
guido+tab-mover@0 60 means any patent claim(s), including without limitation, method,
guido+tab-mover@0 61 process, and apparatus claims, in any patent Licensable by such
guido+tab-mover@0 62 Contributor that would be infringed, but for the grant of the
guido+tab-mover@0 63 License, by the making, using, selling, offering for sale, having
guido+tab-mover@0 64 made, import, or transfer of either its Contributions or its
guido+tab-mover@0 65 Contributor Version.
guido+tab-mover@0 66
guido+tab-mover@0 67 1.12. "Secondary License"
guido+tab-mover@0 68 means either the GNU General Public License, Version 2.0, the GNU
guido+tab-mover@0 69 Lesser General Public License, Version 2.1, the GNU Affero General
guido+tab-mover@0 70 Public License, Version 3.0, or any later versions of those
guido+tab-mover@0 71 licenses.
guido+tab-mover@0 72
guido+tab-mover@0 73 1.13. "Source Code Form"
guido+tab-mover@0 74 means the form of the work preferred for making modifications.
guido+tab-mover@0 75
guido+tab-mover@0 76 1.14. "You" (or "Your")
guido+tab-mover@0 77 means an individual or a legal entity exercising rights under this
guido+tab-mover@0 78 License. For legal entities, "You" includes any entity that
guido+tab-mover@0 79 controls, is controlled by, or is under common control with You. For
guido+tab-mover@0 80 purposes of this definition, "control" means (a) the power, direct
guido+tab-mover@0 81 or indirect, to cause the direction or management of such entity,
guido+tab-mover@0 82 whether by contract or otherwise, or (b) ownership of more than
guido+tab-mover@0 83 fifty percent (50%) of the outstanding shares or beneficial
guido+tab-mover@0 84 ownership of such entity.
guido+tab-mover@0 85
guido+tab-mover@0 86 2. License Grants and Conditions
guido+tab-mover@0 87 --------------------------------
guido+tab-mover@0 88
guido+tab-mover@0 89 2.1. Grants
guido+tab-mover@0 90
guido+tab-mover@0 91 Each Contributor hereby grants You a world-wide, royalty-free,
guido+tab-mover@0 92 non-exclusive license:
guido+tab-mover@0 93
guido+tab-mover@0 94 (a) under intellectual property rights (other than patent or trademark)
guido+tab-mover@0 95 Licensable by such Contributor to use, reproduce, make available,
guido+tab-mover@0 96 modify, display, perform, distribute, and otherwise exploit its
guido+tab-mover@0 97 Contributions, either on an unmodified basis, with Modifications, or
guido+tab-mover@0 98 as part of a Larger Work; and
guido+tab-mover@0 99
guido+tab-mover@0 100 (b) under Patent Claims of such Contributor to make, use, sell, offer
guido+tab-mover@0 101 for sale, have made, import, and otherwise transfer either its
guido+tab-mover@0 102 Contributions or its Contributor Version.
guido+tab-mover@0 103
guido+tab-mover@0 104 2.2. Effective Date
guido+tab-mover@0 105
guido+tab-mover@0 106 The licenses granted in Section 2.1 with respect to any Contribution
guido+tab-mover@0 107 become effective for each Contribution on the date the Contributor first
guido+tab-mover@0 108 distributes such Contribution.
guido+tab-mover@0 109
guido+tab-mover@0 110 2.3. Limitations on Grant Scope
guido+tab-mover@0 111
guido+tab-mover@0 112 The licenses granted in this Section 2 are the only rights granted under
guido+tab-mover@0 113 this License. No additional rights or licenses will be implied from the
guido+tab-mover@0 114 distribution or licensing of Covered Software under this License.
guido+tab-mover@0 115 Notwithstanding Section 2.1(b) above, no patent license is granted by a
guido+tab-mover@0 116 Contributor:
guido+tab-mover@0 117
guido+tab-mover@0 118 (a) for any code that a Contributor has removed from Covered Software;
guido+tab-mover@0 119 or
guido+tab-mover@0 120
guido+tab-mover@0 121 (b) for infringements caused by: (i) Your and any other third party's
guido+tab-mover@0 122 modifications of Covered Software, or (ii) the combination of its
guido+tab-mover@0 123 Contributions with other software (except as part of its Contributor
guido+tab-mover@0 124 Version); or
guido+tab-mover@0 125
guido+tab-mover@0 126 (c) under Patent Claims infringed by Covered Software in the absence of
guido+tab-mover@0 127 its Contributions.
guido+tab-mover@0 128
guido+tab-mover@0 129 This License does not grant any rights in the trademarks, service marks,
guido+tab-mover@0 130 or logos of any Contributor (except as may be necessary to comply with
guido+tab-mover@0 131 the notice requirements in Section 3.4).
guido+tab-mover@0 132
guido+tab-mover@0 133 2.4. Subsequent Licenses
guido+tab-mover@0 134
guido+tab-mover@0 135 No Contributor makes additional grants as a result of Your choice to
guido+tab-mover@0 136 distribute the Covered Software under a subsequent version of this
guido+tab-mover@0 137 License (see Section 10.2) or under the terms of a Secondary License (if
guido+tab-mover@0 138 permitted under the terms of Section 3.3).
guido+tab-mover@0 139
guido+tab-mover@0 140 2.5. Representation
guido+tab-mover@0 141
guido+tab-mover@0 142 Each Contributor represents that the Contributor believes its
guido+tab-mover@0 143 Contributions are its original creation(s) or it has sufficient rights
guido+tab-mover@0 144 to grant the rights to its Contributions conveyed by this License.
guido+tab-mover@0 145
guido+tab-mover@0 146 2.6. Fair Use
guido+tab-mover@0 147
guido+tab-mover@0 148 This License is not intended to limit any rights You have under
guido+tab-mover@0 149 applicable copyright doctrines of fair use, fair dealing, or other
guido+tab-mover@0 150 equivalents.
guido+tab-mover@0 151
guido+tab-mover@0 152 2.7. Conditions
guido+tab-mover@0 153
guido+tab-mover@0 154 Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
guido+tab-mover@0 155 in Section 2.1.
guido+tab-mover@0 156
guido+tab-mover@0 157 3. Responsibilities
guido+tab-mover@0 158 -------------------
guido+tab-mover@0 159
guido+tab-mover@0 160 3.1. Distribution of Source Form
guido+tab-mover@0 161
guido+tab-mover@0 162 All distribution of Covered Software in Source Code Form, including any
guido+tab-mover@0 163 Modifications that You create or to which You contribute, must be under
guido+tab-mover@0 164 the terms of this License. You must inform recipients that the Source
guido+tab-mover@0 165 Code Form of the Covered Software is governed by the terms of this
guido+tab-mover@0 166 License, and how they can obtain a copy of this License. You may not
guido+tab-mover@0 167 attempt to alter or restrict the recipients' rights in the Source Code
guido+tab-mover@0 168 Form.
guido+tab-mover@0 169
guido+tab-mover@0 170 3.2. Distribution of Executable Form
guido+tab-mover@0 171
guido+tab-mover@0 172 If You distribute Covered Software in Executable Form then:
guido+tab-mover@0 173
guido+tab-mover@0 174 (a) such Covered Software must also be made available in Source Code
guido+tab-mover@0 175 Form, as described in Section 3.1, and You must inform recipients of
guido+tab-mover@0 176 the Executable Form how they can obtain a copy of such Source Code
guido+tab-mover@0 177 Form by reasonable means in a timely manner, at a charge no more
guido+tab-mover@0 178 than the cost of distribution to the recipient; and
guido+tab-mover@0 179
guido+tab-mover@0 180 (b) You may distribute such Executable Form under the terms of this
guido+tab-mover@0 181 License, or sublicense it under different terms, provided that the
guido+tab-mover@0 182 license for the Executable Form does not attempt to limit or alter
guido+tab-mover@0 183 the recipients' rights in the Source Code Form under this License.
guido+tab-mover@0 184
guido+tab-mover@0 185 3.3. Distribution of a Larger Work
guido+tab-mover@0 186
guido+tab-mover@0 187 You may create and distribute a Larger Work under terms of Your choice,
guido+tab-mover@0 188 provided that You also comply with the requirements of this License for
guido+tab-mover@0 189 the Covered Software. If the Larger Work is a combination of Covered
guido+tab-mover@0 190 Software with a work governed by one or more Secondary Licenses, and the
guido+tab-mover@0 191 Covered Software is not Incompatible With Secondary Licenses, this
guido+tab-mover@0 192 License permits You to additionally distribute such Covered Software
guido+tab-mover@0 193 under the terms of such Secondary License(s), so that the recipient of
guido+tab-mover@0 194 the Larger Work may, at their option, further distribute the Covered
guido+tab-mover@0 195 Software under the terms of either this License or such Secondary
guido+tab-mover@0 196 License(s).
guido+tab-mover@0 197
guido+tab-mover@0 198 3.4. Notices
guido+tab-mover@0 199
guido+tab-mover@0 200 You may not remove or alter the substance of any license notices
guido+tab-mover@0 201 (including copyright notices, patent notices, disclaimers of warranty,
guido+tab-mover@0 202 or limitations of liability) contained within the Source Code Form of
guido+tab-mover@0 203 the Covered Software, except that You may alter any license notices to
guido+tab-mover@0 204 the extent required to remedy known factual inaccuracies.
guido+tab-mover@0 205
guido+tab-mover@0 206 3.5. Application of Additional Terms
guido+tab-mover@0 207
guido+tab-mover@0 208 You may choose to offer, and to charge a fee for, warranty, support,
guido+tab-mover@0 209 indemnity or liability obligations to one or more recipients of Covered
guido+tab-mover@0 210 Software. However, You may do so only on Your own behalf, and not on
guido+tab-mover@0 211 behalf of any Contributor. You must make it absolutely clear that any
guido+tab-mover@0 212 such warranty, support, indemnity, or liability obligation is offered by
guido+tab-mover@0 213 You alone, and You hereby agree to indemnify every Contributor for any
guido+tab-mover@0 214 liability incurred by such Contributor as a result of warranty, support,
guido+tab-mover@0 215 indemnity or liability terms You offer. You may include additional
guido+tab-mover@0 216 disclaimers of warranty and limitations of liability specific to any
guido+tab-mover@0 217 jurisdiction.
guido+tab-mover@0 218
guido+tab-mover@0 219 4. Inability to Comply Due to Statute or Regulation
guido+tab-mover@0 220 ---------------------------------------------------
guido+tab-mover@0 221
guido+tab-mover@0 222 If it is impossible for You to comply with any of the terms of this
guido+tab-mover@0 223 License with respect to some or all of the Covered Software due to
guido+tab-mover@0 224 statute, judicial order, or regulation then You must: (a) comply with
guido+tab-mover@0 225 the terms of this License to the maximum extent possible; and (b)
guido+tab-mover@0 226 describe the limitations and the code they affect. Such description must
guido+tab-mover@0 227 be placed in a text file included with all distributions of the Covered
guido+tab-mover@0 228 Software under this License. Except to the extent prohibited by statute
guido+tab-mover@0 229 or regulation, such description must be sufficiently detailed for a
guido+tab-mover@0 230 recipient of ordinary skill to be able to understand it.
guido+tab-mover@0 231
guido+tab-mover@0 232 5. Termination
guido+tab-mover@0 233 --------------
guido+tab-mover@0 234
guido+tab-mover@0 235 5.1. The rights granted under this License will terminate automatically
guido+tab-mover@0 236 if You fail to comply with any of its terms. However, if You become
guido+tab-mover@0 237 compliant, then the rights granted under this License from a particular
guido+tab-mover@0 238 Contributor are reinstated (a) provisionally, unless and until such
guido+tab-mover@0 239 Contributor explicitly and finally terminates Your grants, and (b) on an
guido+tab-mover@0 240 ongoing basis, if such Contributor fails to notify You of the
guido+tab-mover@0 241 non-compliance by some reasonable means prior to 60 days after You have
guido+tab-mover@0 242 come back into compliance. Moreover, Your grants from a particular
guido+tab-mover@0 243 Contributor are reinstated on an ongoing basis if such Contributor
guido+tab-mover@0 244 notifies You of the non-compliance by some reasonable means, this is the
guido+tab-mover@0 245 first time You have received notice of non-compliance with this License
guido+tab-mover@0 246 from such Contributor, and You become compliant prior to 30 days after
guido+tab-mover@0 247 Your receipt of the notice.
guido+tab-mover@0 248
guido+tab-mover@0 249 5.2. If You initiate litigation against any entity by asserting a patent
guido+tab-mover@0 250 infringement claim (excluding declaratory judgment actions,
guido+tab-mover@0 251 counter-claims, and cross-claims) alleging that a Contributor Version
guido+tab-mover@0 252 directly or indirectly infringes any patent, then the rights granted to
guido+tab-mover@0 253 You by any and all Contributors for the Covered Software under Section
guido+tab-mover@0 254 2.1 of this License shall terminate.
guido+tab-mover@0 255
guido+tab-mover@0 256 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
guido+tab-mover@0 257 end user license agreements (excluding distributors and resellers) which
guido+tab-mover@0 258 have been validly granted by You or Your distributors under this License
guido+tab-mover@0 259 prior to termination shall survive termination.
guido+tab-mover@0 260
guido+tab-mover@0 261 ************************************************************************
guido+tab-mover@0 262 * *
guido+tab-mover@0 263 * 6. Disclaimer of Warranty *
guido+tab-mover@0 264 * ------------------------- *
guido+tab-mover@0 265 * *
guido+tab-mover@0 266 * Covered Software is provided under this License on an "as is" *
guido+tab-mover@0 267 * basis, without warranty of any kind, either expressed, implied, or *
guido+tab-mover@0 268 * statutory, including, without limitation, warranties that the *
guido+tab-mover@0 269 * Covered Software is free of defects, merchantable, fit for a *
guido+tab-mover@0 270 * particular purpose or non-infringing. The entire risk as to the *
guido+tab-mover@0 271 * quality and performance of the Covered Software is with You. *
guido+tab-mover@0 272 * Should any Covered Software prove defective in any respect, You *
guido+tab-mover@0 273 * (not any Contributor) assume the cost of any necessary servicing, *
guido+tab-mover@0 274 * repair, or correction. This disclaimer of warranty constitutes an *
guido+tab-mover@0 275 * essential part of this License. No use of any Covered Software is *
guido+tab-mover@0 276 * authorized under this License except under this disclaimer. *
guido+tab-mover@0 277 * *
guido+tab-mover@0 278 ************************************************************************
guido+tab-mover@0 279
guido+tab-mover@0 280 ************************************************************************
guido+tab-mover@0 281 * *
guido+tab-mover@0 282 * 7. Limitation of Liability *
guido+tab-mover@0 283 * -------------------------- *
guido+tab-mover@0 284 * *
guido+tab-mover@0 285 * Under no circumstances and under no legal theory, whether tort *
guido+tab-mover@0 286 * (including negligence), contract, or otherwise, shall any *
guido+tab-mover@0 287 * Contributor, or anyone who distributes Covered Software as *
guido+tab-mover@0 288 * permitted above, be liable to You for any direct, indirect, *
guido+tab-mover@0 289 * special, incidental, or consequential damages of any character *
guido+tab-mover@0 290 * including, without limitation, damages for lost profits, loss of *
guido+tab-mover@0 291 * goodwill, work stoppage, computer failure or malfunction, or any *
guido+tab-mover@0 292 * and all other commercial damages or losses, even if such party *
guido+tab-mover@0 293 * shall have been informed of the possibility of such damages. This *
guido+tab-mover@0 294 * limitation of liability shall not apply to liability for death or *
guido+tab-mover@0 295 * personal injury resulting from such party's negligence to the *
guido+tab-mover@0 296 * extent applicable law prohibits such limitation. Some *
guido+tab-mover@0 297 * jurisdictions do not allow the exclusion or limitation of *
guido+tab-mover@0 298 * incidental or consequential damages, so this exclusion and *
guido+tab-mover@0 299 * limitation may not apply to You. *
guido+tab-mover@0 300 * *
guido+tab-mover@0 301 ************************************************************************
guido+tab-mover@0 302
guido+tab-mover@0 303 8. Litigation
guido+tab-mover@0 304 -------------
guido+tab-mover@0 305
guido+tab-mover@0 306 Any litigation relating to this License may be brought only in the
guido+tab-mover@0 307 courts of a jurisdiction where the defendant maintains its principal
guido+tab-mover@0 308 place of business and such litigation shall be governed by laws of that
guido+tab-mover@0 309 jurisdiction, without reference to its conflict-of-law provisions.
guido+tab-mover@0 310 Nothing in this Section shall prevent a party's ability to bring
guido+tab-mover@0 311 cross-claims or counter-claims.
guido+tab-mover@0 312
guido+tab-mover@0 313 9. Miscellaneous
guido+tab-mover@0 314 ----------------
guido+tab-mover@0 315
guido+tab-mover@0 316 This License represents the complete agreement concerning the subject
guido+tab-mover@0 317 matter hereof. If any provision of this License is held to be
guido+tab-mover@0 318 unenforceable, such provision shall be reformed only to the extent
guido+tab-mover@0 319 necessary to make it enforceable. Any law or regulation which provides
guido+tab-mover@0 320 that the language of a contract shall be construed against the drafter
guido+tab-mover@0 321 shall not be used to construe this License against a Contributor.
guido+tab-mover@0 322
guido+tab-mover@0 323 10. Versions of the License
guido+tab-mover@0 324 ---------------------------
guido+tab-mover@0 325
guido+tab-mover@0 326 10.1. New Versions
guido+tab-mover@0 327
guido+tab-mover@0 328 Mozilla Foundation is the license steward. Except as provided in Section
guido+tab-mover@0 329 10.3, no one other than the license steward has the right to modify or
guido+tab-mover@0 330 publish new versions of this License. Each version will be given a
guido+tab-mover@0 331 distinguishing version number.
guido+tab-mover@0 332
guido+tab-mover@0 333 10.2. Effect of New Versions
guido+tab-mover@0 334
guido+tab-mover@0 335 You may distribute the Covered Software under the terms of the version
guido+tab-mover@0 336 of the License under which You originally received the Covered Software,
guido+tab-mover@0 337 or under the terms of any subsequent version published by the license
guido+tab-mover@0 338 steward.
guido+tab-mover@0 339
guido+tab-mover@0 340 10.3. Modified Versions
guido+tab-mover@0 341
guido+tab-mover@0 342 If you create software not governed by this License, and you want to
guido+tab-mover@0 343 create a new license for such software, you may create and use a
guido+tab-mover@0 344 modified version of this License if you rename the license and remove
guido+tab-mover@0 345 any references to the name of the license steward (except to note that
guido+tab-mover@0 346 such modified license differs from this License).
guido+tab-mover@0 347
guido+tab-mover@0 348 10.4. Distributing Source Code Form that is Incompatible With Secondary
guido+tab-mover@0 349 Licenses
guido+tab-mover@0 350
guido+tab-mover@0 351 If You choose to distribute Source Code Form that is Incompatible With
guido+tab-mover@0 352 Secondary Licenses under the terms of this version of the License, the
guido+tab-mover@0 353 notice described in Exhibit B of this License must be attached.
guido+tab-mover@0 354
guido+tab-mover@0 355 Exhibit A - Source Code Form License Notice
guido+tab-mover@0 356 -------------------------------------------
guido+tab-mover@0 357
guido+tab-mover@0 358 This Source Code Form is subject to the terms of the Mozilla Public
guido+tab-mover@0 359 License, v. 2.0. If a copy of the MPL was not distributed with this
guido+tab-mover@0 360 file, You can obtain one at http://mozilla.org/MPL/2.0/.
guido+tab-mover@0 361
guido+tab-mover@0 362 If it is not possible or desirable to put the notice in a particular
guido+tab-mover@0 363 file, then You may include the notice in a location (such as a LICENSE
guido+tab-mover@0 364 file in a relevant directory) where a recipient would be likely to look
guido+tab-mover@0 365 for such a notice.
guido+tab-mover@0 366
guido+tab-mover@0 367 You may add additional accurate notices of copyright ownership.
guido+tab-mover@0 368
guido+tab-mover@0 369 Exhibit B - "Incompatible With Secondary Licenses" Notice
guido+tab-mover@0 370 ---------------------------------------------------------
guido+tab-mover@0 371
guido+tab-mover@0 372 This Source Code Form is "Incompatible With Secondary Licenses", as
guido+tab-mover@0 373 defined by the Mozilla Public License, v. 2.0.